Skip to content

Commit

Permalink
[IOS] Create feature flag for Tabs Search
Browse files Browse the repository at this point in the history
Bug: 1263582
Change-Id: Iec87b1825cc69a5b603c4d4903410c29d6f0d9cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3244317
Auto-Submit: Mohammad Refaat <mrefaat@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#935419}
  • Loading branch information
mrefaat88 authored and Chromium LUCI CQ committed Oct 27, 2021
1 parent 04fd5c5 commit 76b14f5
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chrome/browser/flag-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5193,6 +5193,11 @@
"owners": [ "mrefaat", "michaeldo", "bling-flags@google.com" ],
"expiry_milestone": 98
},
{
"name": "tabs-search-ios",
"owners": [ "mrefaat", "michaeldo", "bling-flags@google.com" ],
"expiry_milestone":100
},
{
"name": "terminal-ssh",
"owners": [ "lxj@google.com", "joelhockey", "//chrome/browser/ash/guest_os/OWNERS" ],
Expand Down
3 changes: 3 additions & 0 deletions ios/chrome/browser/flags/about_flags.mm
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,9 @@
{"tabs-bulkactions-ios", flag_descriptions::kTabsBulkActionsName,
flag_descriptions::kTabsBulkActionsDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kTabsBulkActions)},
{"tabs-search-ios", flag_descriptions::kTabsSearchName,
flag_descriptions::kTabsSearchDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kTabsSearch)},
{"incognito-brand-consistency-for-ios",
flag_descriptions::kIncognitoBrandConsistencyForIOSName,
flag_descriptions::kIncognitoBrandConsistencyForIOSDescription,
Expand Down
5 changes: 5 additions & 0 deletions ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ const char kTabsBulkActionsDescription[] =
"Enables the selection mode in the Tab grid where users can perform "
"actions on multiple tabs at once for iOS 13 and above.";

extern const char kTabsSearchName[] = "Enable Tabs Search";
extern const char kTabsSearchDescription[] =
"Enables the search mode in the Tab grid where users can search open tabs "
"or recent tabs.";

const char kToolbarContainerName[] = "Use Toolbar Containers";
const char kToolbarContainerDescription[] =
"When enabled, the toolbars and their fullscreen animations will be "
Expand Down
4 changes: 4 additions & 0 deletions ios/chrome/browser/flags/ios_chrome_flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ extern const char kSyncTrustedVaultPassphraseRecoveryDescription[];
extern const char kTabsBulkActionsName[];
extern const char kTabsBulkActionsDescription[];

// Title and description for the flag to enable tabs search feature.
extern const char kTabsSearchName[];
extern const char kTabsSearchDescription[];

// Title and description for the flag to enable the toolbar container
// implementation.
extern const char kToolbarContainerName[];
Expand Down
6 changes: 6 additions & 0 deletions ios/chrome/browser/ui/tab_switcher/tab_grid/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
// Feature flag to enable Bulk Actions.
extern const base::Feature kTabsBulkActions;

// Feature flag to enable Tabs Search.
extern const base::Feature kTabsSearch;

// Whether the kTabsBulkActions flag is enabled.
bool IsTabsBulkActionsEnabled();

// Whether the kTabsSearch flag is enabled.
bool IsTabsSearchEnabled();

#endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_GRID_FEATURES_H_
7 changes: 7 additions & 0 deletions ios/chrome/browser/ui/tab_switcher/tab_grid/features.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
const base::Feature kTabsBulkActions{"TabsBulkActions",
base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kTabsSearch{"TabsSearch",
base::FEATURE_DISABLED_BY_DEFAULT};

bool IsTabsBulkActionsEnabled() {
return base::FeatureList::IsEnabled(kTabsBulkActions);
}

bool IsTabsSearchEnabled() {
return base::FeatureList::IsEnabled(kTabsSearch);
}

0 comments on commit 76b14f5

Please sign in to comment.