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

Unified Diff: chrome/browser/about_flags.cc

Issue 578333003: Workaround to remove command line flag on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | chrome/browser/bookmarks/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index a1d3a56a8e87c6d6eb82b2bb92ccaec66f6be38c..a209a1d1867f34d69f17d69cf0521d273c60b4cf 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2017,7 +2017,8 @@ void GetSanitizedEnabledFlags(
*result = flags_storage->GetFlags();
}
-bool SkipConditionalExperiment(const Experiment& experiment) {
+bool SkipConditionalExperiment(const Experiment& experiment,
+ FlagsStorage* flags_storage) {
if (experiment.internal_name ==
std::string("enhanced-bookmarks-experiment")) {
#if defined(OS_ANDROID)
@@ -2030,7 +2031,7 @@ bool SkipConditionalExperiment(const Experiment& experiment) {
if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment))
return false;
- return !IsEnhancedBookmarksExperimentEnabled();
+ return !IsEnhancedBookmarksExperimentEnabled(flags_storage);
#endif
}
@@ -2172,7 +2173,7 @@ void GetFlagsExperimentsData(FlagsStorage* flags_storage,
for (size_t i = 0; i < num_experiments; ++i) {
const Experiment& experiment = experiments[i];
- if (SkipConditionalExperiment(experiment))
+ if (SkipConditionalExperiment(experiment, flags_storage))
continue;
base::DictionaryValue* data = new base::DictionaryValue();
@@ -2369,6 +2370,14 @@ void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
continue;
}
+#if defined(OS_CHROMEOS)
+ // On Chrome OS setting command line flag may make browser to restart on
+ // user login. As this flag eventually will be set to a significant number
+ // of users skip manual-enhanced-bookmarks to avoid restart.
+ if (experiment_name == "manual-enhanced-bookmarks")
+ continue;
+#endif
+
const std::pair<std::string, std::string>&
switch_and_value_pair = name_to_switch_it->second;
« no previous file with comments | « no previous file | chrome/browser/bookmarks/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698