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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 442913002: Enable auto-reload by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 6 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index f6553c3e8370a3fa1221f398a8862494add9d927..b7b7424f975f8a83b5a3e93dbe622305f6061440 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1122,6 +1122,11 @@ std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
namespace {
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(
"AutoReloadExperiment");
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
@@ -1129,17 +1134,11 @@ bool IsAutoReloadEnabled() {
return true;
if (browser_command_line.HasSwitch(switches::kDisableOfflineAutoReload))
return false;
-#if !defined(OS_ANDROID) && !defined(OS_IOS)
- 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
+ return true;
}
bool IsAutoReloadVisibleOnlyEnabled() {
+ // See the block comment in IsAutoReloadEnabled().
std::string group = base::FieldTrialList::FindFullName(
"AutoReloadVisibleOnlyExperiment");
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
@@ -1151,7 +1150,7 @@ bool IsAutoReloadVisibleOnlyEnabled() {
switches::kDisableOfflineAutoReloadVisibleOnly)) {
return false;
}
- return group == "Enabled";
+ return true;
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698