| Index: chrome/browser/bookmarks/enhanced_bookmarks_features.cc
|
| diff --git a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc b/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
|
| index 9f681c6b38764215cc496431cb9dfae13fd0139f..c8160809f61871fe21f80722f20a2d263d781c15 100644
|
| --- a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
|
| +++ b/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
|
| @@ -37,17 +37,8 @@ bool GetBookmarksExperimentExtensionID(std::string* extension_id) {
|
| if (extension_id->empty())
|
| return false;
|
|
|
| - // kEnhancedBookmarksExperiment flag could have values "", "1" and "0".
|
| - // "0" - user opted out.
|
| - bool opt_out = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| - switches::kEnhancedBookmarksExperiment) == "0";
|
| -
|
| - if (opt_out)
|
| - return false;
|
| -
|
| #if defined(OS_ANDROID)
|
| - return base::android::BuildInfo::GetInstance()->sdk_int() >
|
| - base::android::SdkVersion::SDK_VERSION_ICE_CREAM_SANDWICH_MR1;
|
| + return true;
|
| #else
|
| const extensions::FeatureProvider* feature_provider =
|
| extensions::FeatureProvider::GetPermissionFeatures();
|
| @@ -73,10 +64,33 @@ bool IsEnhancedBookmarkImageFetchingEnabled(const PrefService* user_prefs) {
|
|
|
| bool IsEnhancedBookmarksEnabled() {
|
| std::string extension_id;
|
| - return GetBookmarksExperimentExtensionID(&extension_id);
|
| + return IsEnhancedBookmarksEnabled(&extension_id);
|
| }
|
| #endif
|
|
|
| +bool IsEnhancedBookmarksEnabled(std::string* extension_id) {
|
| + // kEnhancedBookmarksExperiment flag could have values "", "1" and "0".
|
| + // "0" - user opted out.
|
| + bool opt_out = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + switches::kEnhancedBookmarksExperiment) == "0";
|
| +
|
| +#if defined(OS_ANDROID)
|
| + opt_out |= base::android::BuildInfo::GetInstance()->sdk_int() <
|
| + base::android::SdkVersion::SDK_VERSION_ICE_CREAM_SANDWICH_MR1;
|
| +
|
| + // Android tests use command line flag to force enhanced bookmark to be on.
|
| + bool opt_in = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + switches::kEnhancedBookmarksExperiment) == "1";
|
| + if (opt_in)
|
| + return true;
|
| +#endif
|
| +
|
| + if (opt_out)
|
| + return false;
|
| +
|
| + return GetBookmarksExperimentExtensionID(extension_id);
|
| +}
|
| +
|
| bool IsEnableDomDistillerSet() {
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnableDomDistiller)) {
|
|
|