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

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
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..5c820862e2199f17f0239d53c48652971e71edde 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,21 @@ void ForceFinchBookmarkExperimentIfNeeded(
}
}
-bool IsEnhancedBookmarksExperimentEnabled() {
+bool IsEnhancedBookmarksExperimentEnabled(
+ about_flags::FlagsStorage* flags_storage) {
+#if defined(OS_CHROMEOS)
sky 2014/09/24 17:22:09 Again, add a comment.
yefimt 2014/09/24 18:46:12 Done.
+ 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();
}
« chrome/browser/bookmarks/DEPS ('K') | « 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