Add chrome-side code for autoreload experiment.

In ChromeContentBrowserClient, check for membership in the trial group, and if the autoreload field trial is enabled, set the renderer command-line flag to enable it.

BUG=355569
TEST=unit,trybot

Review URL: https://codereview.chromium.org/212533004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260238 0039d316-1c4b-4281-b951-d872f2087c98
parent cfb39f69
...@@ -1552,6 +1552,17 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( ...@@ -1552,6 +1552,17 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
#endif #endif
} }
{
// Enable auto-reload if this session is in the field trial or the user
// explicitly enabled it.
std::string group =
base::FieldTrialList::FindFullName("AutoReloadExperiment");
if (group == "Enabled" ||
browser_command_line.HasSwitch(switches::kEnableOfflineAutoReload)) {
command_line->AppendSwitch(switches::kEnableOfflineAutoReload);
}
}
// Please keep this in alphabetical order. // Please keep this in alphabetical order.
static const char* const kSwitchNames[] = { static const char* const kSwitchNames[] = {
autofill::switches::kDisableIgnoreAutocompleteOff, autofill::switches::kDisableIgnoreAutocompleteOff,
...@@ -1581,7 +1592,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( ...@@ -1581,7 +1592,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kEnableNaClDebug, switches::kEnableNaClDebug,
switches::kEnableNaClNonSfiMode, switches::kEnableNaClNonSfiMode,
switches::kEnableNetBenchmarking, switches::kEnableNetBenchmarking,
switches::kEnableOfflineAutoReload,
switches::kEnableStreamlinedHostedApps, switches::kEnableStreamlinedHostedApps,
switches::kEnableWatchdog, switches::kEnableWatchdog,
switches::kMemoryProfiling, switches::kMemoryProfiling,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment