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); |