Enable auto-reload by default.

Stop honoring the Finch enable/disable groups, but still honor explicit flips
of the flags in chrome://flags.

BUG=383169

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288081 0039d316-1c4b-4281-b951-d872f2087c98
parent 09c60220
...@@ -1106,6 +1106,11 @@ std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( ...@@ -1106,6 +1106,11 @@ std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
namespace { namespace {
bool IsAutoReloadEnabled() { bool IsAutoReloadEnabled() {
// Fetch the field trial, even though we don't use it. Calling FindFullName()
// causes the field-trial mechanism to report which group we're in, which
// might reflect a hard disable or hard enable via flag, both of which have
// their own field trial groups. This lets us know what percentage of users
// manually enable or disable auto-reload.
std::string group = base::FieldTrialList::FindFullName( std::string group = base::FieldTrialList::FindFullName(
"AutoReloadExperiment"); "AutoReloadExperiment");
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
...@@ -1113,17 +1118,11 @@ bool IsAutoReloadEnabled() { ...@@ -1113,17 +1118,11 @@ bool IsAutoReloadEnabled() {
return true; return true;
if (browser_command_line.HasSwitch(switches::kDisableOfflineAutoReload)) if (browser_command_line.HasSwitch(switches::kDisableOfflineAutoReload))
return false; return false;
#if !defined(OS_ANDROID) && !defined(OS_IOS) return true;
chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
chrome::VersionInfo::Channel kForceChannel =
chrome::VersionInfo::CHANNEL_CANARY;
return (channel <= kForceChannel || group == "Enabled");
#else
return group == "Enabled";
#endif
} }
bool IsAutoReloadVisibleOnlyEnabled() { bool IsAutoReloadVisibleOnlyEnabled() {
// See the block comment in IsAutoReloadEnabled().
std::string group = base::FieldTrialList::FindFullName( std::string group = base::FieldTrialList::FindFullName(
"AutoReloadVisibleOnlyExperiment"); "AutoReloadVisibleOnlyExperiment");
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
...@@ -1135,7 +1134,7 @@ bool IsAutoReloadVisibleOnlyEnabled() { ...@@ -1135,7 +1134,7 @@ bool IsAutoReloadVisibleOnlyEnabled() {
switches::kDisableOfflineAutoReloadVisibleOnly)) { switches::kDisableOfflineAutoReloadVisibleOnly)) {
return false; return false;
} }
return group == "Enabled"; return true;
} }
} // namespace } // namespace
......
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