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

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

Issue 497563002: [Android] Use correct enhanced bookmarks enabling logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call UpdateBookmarksExperimentState on startup, JNI binding, etc.. Created 6 years, 4 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
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 aad3817e1bcacbf3786729c87ccb50b76c88132b..53af4e47bf98f3768532d4ebc741ae14c7f8c766 100644
--- a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
+++ b/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
@@ -129,6 +129,14 @@ void UpdateBookmarksExperimentState(
}
}
+#if defined(OS_ANDROID)
+ bool opt_in = !opt_out
+ && CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kEnhancedBookmarksExperiment) == "1";
+ if (opt_in && bookmarks_experiment_new_state == BOOKMARKS_EXPERIMENT_NONE)
+ bookmarks_experiment_new_state = BOOKMARKS_EXPERIMENT_ENABLED;
+#endif
+
UMA_HISTOGRAM_ENUMERATION("EnhancedBookmarks.SyncExperimentState",
bookmarks_experiment_new_state,
BOOKMARKS_EXPERIMENT_ENUM_SIZE);
@@ -170,10 +178,15 @@ void ForceFinchBookmarkExperimentIfNeeded(
bool IsEnhancedBookmarksExperimentEnabled() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
+#if defined(OS_ANDROID)
+ if (command_line->HasSwitch(switches::kManualEnhancedBookmarks))
+ return true;
+#else
if (command_line->HasSwitch(switches::kManualEnhancedBookmarks) ||
command_line->HasSwitch(switches::kManualEnhancedBookmarksOptout)) {
Kibeom Kim (inactive) 2014/08/27 21:44:09 yefim@: what's the reason for returning true on th
return true;
}
+#endif
return IsEnhancedBookmarksExperimentEnabledFromFinch();
}

Powered by Google App Engine
This is Rietveld 408576698