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

Unified Diff: chrome/browser/bookmarks/enhanced_bookmarks_features.cc

Issue 1017913002: Force Enhanced Bookmark to be enabled if command line flags are set true (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « chrome/browser/bookmarks/OWNERS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4aa2a011df4b3d3968c5073276e08d41d5386392 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;
-
danduong 2015/03/18 17:51:41 This might still be needed for non-Android
Mike Wittman 2015/03/18 18:10:19 Yes, it is. if you're moving this to IsEnhancedBoo
Ian Wen 2015/03/18 18:45:55 Reverted this part. This check should be kept here
#if defined(OS_ANDROID)
danduong 2015/03/18 17:51:41 Shouldn't this be IOS too?
noyau (Ping after 24h) 2015/03/18 23:21:58 Probably, but we do not compile this file for iOS
danduong 2015/03/18 23:28:56 Thanks for the clarification. I didn't realize th
noyau (Ping after 24h) 2015/03/19 12:22:26 That's why I have a watch on this file, because wh
- 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,6 +64,25 @@ bool IsEnhancedBookmarkImageFetchingEnabled(const PrefService* user_prefs) {
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)
Ted C 2015/03/18 15:42:00 Unless I'm reading this wrong, this is an Android
Ian Wen 2015/03/18 18:45:55 Acknowledged.
+ bool opt_in = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kEnhancedBookmarksExperiment) == "1";
+ if (opt_in)
+ return true;
+
+ opt_out = base::android::BuildInfo::GetInstance()->sdk_int() <
Ted C 2015/03/18 15:42:00 this needs to be |-ed otherwise the opt_out above
Ian Wen 2015/03/18 18:45:55 Oops sorry, I did not test this CL last night befo
+ base::android::SdkVersion::SDK_VERSION_ICE_CREAM_SANDWICH_MR1;
noyau (Ping after 24h) 2015/03/18 13:32:14 Unless I misunderstand this will skew the finch ex
Ted C 2015/03/18 15:42:00 We just need to make sure this ICS logic is always
+#endif
+
+ if (opt_out)
+ return false;
+
return GetBookmarksExperimentExtensionID(&extension_id);
}
#endif
« no previous file with comments | « chrome/browser/bookmarks/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698