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

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

Issue 1491253003: Enable enhanced bookmarks by default on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | 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 8dcf78ec088faac9e4a61eb202260d5942a28cf1..09d606b769b59674dcff0a164df6caf45cbd41c1 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -15,7 +15,6 @@
#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h"
#include "components/autofill/core/common/autofill_switches.h"
-#include "components/enhanced_bookmarks/enhanced_bookmark_features.h"
#include "components/variations/variations_associated_data.h"
#include "ios/chrome/browser/chrome_switches.h"
#include "ios/web/public/web_view_creation_util.h"
@@ -46,7 +45,23 @@ bool IsAlertOnBackgroundUploadEnabled() {
}
bool IsBookmarkCollectionEnabled() {
- return enhanced_bookmarks::IsEnhancedBookmarksEnabled();
+ // kEnhancedBookmarksExperiment flag could have values "", "1" and "0". "" -
lpromero 2015/12/02 17:37:08 This doesn't wrap nicely. Add a new line after "0"
stkhapugin 2015/12/04 16:55:59 Done.
+ // default, "0" - user opted out, "1" - user opted in. Tests also use the
+ // command line flag to force enhanced bookmark to be on.
+ // The default behavior is Opt In.
lpromero 2015/12/02 17:37:08 I wouldn’t add this comment here. The following li
stkhapugin 2015/12/04 16:55:59 Done.
+ std::string switch_value =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kEnhancedBookmarksExperiment);
+ if (switch_value == "1")
+ return true;
+ if (switch_value == "0")
+ return false;
+
+ // Check if the finch experiment is turned on.
+ std::string group_name =
+ base::FieldTrialList::FindFullName("IOSNewBookmarksUI");
+ return !base::StartsWith(group_name, "Disabled",
+ base::CompareCase::INSENSITIVE_ASCII);
}
void SetWKWebViewTrialEligibility(bool eligible) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698