Chromium Code Reviews| 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) { |