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

Unified Diff: chrome/browser/about_flags.cc

Issue 68173031: Added enhanced bookmarks extension as an external component extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index e6aef05b20639ea0b0e693c1e1d12c8fbb8ac736..3a16f016ee560d66c673a40c5503f80864dd69ec 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -17,6 +17,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "cc/base/switches.h"
+#include "chrome/browser/extensions/external_component_loader.h"
#include "chrome/browser/flags_storage.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_switches.h"
@@ -1829,6 +1830,14 @@ const Experiment kExperiments[] = {
kOsDesktop,
SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint)
},
+ {
+ "enable-enhanced-bookmarks",
+ IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
+ IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
+ kOsDesktop,
+ ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableEnhancedBookmarks, "1",
+ switches::kEnableEnhancedBookmarks, "0")
+ },
};
const Experiment* experiments = kExperiments;
@@ -1931,6 +1940,15 @@ void GetSanitizedEnabledFlags(
*result = flags_storage->GetFlags();
}
+bool SkipConditionalExperiment(const Experiment& experiment) {
+ if (experiment.internal_name == std::string("enable-enhanced-bookmarks")) {
+ return !extensions::ExternalComponentLoader::
+ IsEnhancedBookmarksExperimentEnabled();
+ }
+ return false;
+}
+
+
// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
// enabled on the current platform.
void GetSanitizedEnabledFlagsForCurrentPlatform(
@@ -2038,6 +2056,8 @@ void GetFlagsExperimentsData(FlagsStorage* flags_storage,
for (size_t i = 0; i < num_experiments; ++i) {
const Experiment& experiment = experiments[i];
+ if (SkipConditionalExperiment(experiment))
+ continue;
DictionaryValue* data = new DictionaryValue();
data->SetString("internal_name", experiment.internal_name);

Powered by Google App Engine
This is Rietveld 408576698