Add --v8-cache-options to chrome://flags UI.
(The previous attempt, crrev.com/431333002, was never landed.
This CL supersedes that one.)
BUG=399580
Review URL: https://codereview.chromium.org/1205403002
Cr-Commit-Position: refs/heads/master@{#336749}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 4743c75..e2238a72 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -518,6 +518,13 @@
"online-check-only" }
};
+const Experiment::Choice kV8CacheOptionsChoices[] = {
+ { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
+ { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kV8CacheOptions, "none" },
+ { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE, switches::kV8CacheOptions, "parse" },
+ { IDS_FLAGS_V8_CACHE_OPTIONS_CODE, switches::kV8CacheOptions, "code" },
+};
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the experiment is the internal name. If you'd like to
@@ -2010,6 +2017,12 @@
kOsCrOS,
SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode)},
#endif // OS_CHROMEOS
+ {"v8-cache-options",
+ IDS_FLAGS_V8_CACHE_OPTIONS_NAME,
+ IDS_FLAGS_V8_CACHE_OPTIONS_DESCRIPTION,
+ kOsAll,
+ MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
+
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.