Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: ios/chrome/browser/experimental_flags.mm

Issue 1970163002: Adding flags and finch trial for the removal of All Bookmarks view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/experimental_flags.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/experimental_flags.mm
diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm
index 5d516a3ca1bca28e42e74a641abeb20a2b17236c..9218e898a40d629ddfbf52486cbba7aba606a721 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -102,4 +102,20 @@ bool IsReadingListEnabled() {
return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableReadingList];
}
+bool IsAllBookmarksEnabled() {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kEnableAllBookmarksView)) {
+ return true;
+ } else if (command_line->HasSwitch(switches::kDisableAllBookmarksView)) {
+ return false;
+ }
+
+ // Check if the finch experiment is turned on. Flag is off by default.
+ std::string group_name =
+ base::FieldTrialList::FindFullName("RemoveAllBookmarks");
+
+ return base::StartsWith(group_name, "Enabled",
+ base::CompareCase::INSENSITIVE_ASCII);
+}
+
} // namespace experimental_flags
« no previous file with comments | « ios/chrome/browser/experimental_flags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698