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

Unified Diff: chrome/browser/bookmarks/enhanced_bookmarks_features.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 | « chrome/browser/bookmarks/enhanced_bookmarks_features.h ('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 b1237632f05d229e4bc389538d8a10350607f98e..a7bca68d3d2d6d214bad341a989af12e33515dee 100644
--- a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
+++ b/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
@@ -11,6 +11,7 @@
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/flags_storage.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/common/chrome_switches.h"
@@ -190,12 +191,23 @@ void ForceFinchBookmarkExperimentIfNeeded(
}
}
-bool IsEnhancedBookmarksExperimentEnabled() {
+bool IsEnhancedBookmarksExperimentEnabled(
+ about_flags::FlagsStorage* flags_storage) {
+#if defined(OS_CHROMEOS)
+ // We are not setting command line flags on Chrome OS to avoid browser restart
+ // but still have flags in flags_storage. So check flags_storage instead.
+ const std::set<std::string> flags = flags_storage->GetFlags();
+ if (flags.find(switches::kManualEnhancedBookmarks) != flags.end())
+ return true;
+ if (flags.find(switches::kManualEnhancedBookmarksOptout) != flags.end())
+ return true;
+#else
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kManualEnhancedBookmarks) ||
command_line->HasSwitch(switches::kManualEnhancedBookmarksOptout)) {
return true;
}
+#endif
return IsEnhancedBookmarksExperimentEnabledFromFinch();
}
« no previous file with comments | « chrome/browser/bookmarks/enhanced_bookmarks_features.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698