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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 1116
1117 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( 1117 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
1118 const std::string& alias_name) { 1118 const std::string& alias_name) {
1119 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); 1119 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name);
1120 } 1120 }
1121 1121
1122 namespace { 1122 namespace {
1123 1123
1124 bool IsAutoReloadEnabled() { 1124 bool IsAutoReloadEnabled() {
1125 std::string group = base::FieldTrialList::FindFullName( 1125 std::string group = base::FieldTrialList::FindFullName(
1126 "AutoReloadExperiment"); 1126 "AutoReloadExperiment");
mmenke 2014/08/05 19:36:59 If we're getting rid of the field trial, should ge
Elly Fong-Jones 2014/08/05 19:41:56 No, we need to leave the field trial there. The fi
mmenke 2014/08/05 20:33:59 I'm not following. How does this record whether p
1127 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 1127 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
1128 if (browser_command_line.HasSwitch(switches::kEnableOfflineAutoReload)) 1128 if (browser_command_line.HasSwitch(switches::kEnableOfflineAutoReload))
1129 return true; 1129 return true;
1130 if (browser_command_line.HasSwitch(switches::kDisableOfflineAutoReload)) 1130 if (browser_command_line.HasSwitch(switches::kDisableOfflineAutoReload))
1131 return false; 1131 return false;
1132 #if !defined(OS_ANDROID) && !defined(OS_IOS) 1132 return true;
1133 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
1134 chrome::VersionInfo::Channel kForceChannel =
1135 chrome::VersionInfo::CHANNEL_CANARY;
1136 return (channel <= kForceChannel || group == "Enabled");
1137 #else
1138 return group == "Enabled";
1139 #endif
1140 } 1133 }
1141 1134
1142 bool IsAutoReloadVisibleOnlyEnabled() { 1135 bool IsAutoReloadVisibleOnlyEnabled() {
1143 std::string group = base::FieldTrialList::FindFullName( 1136 std::string group = base::FieldTrialList::FindFullName(
1144 "AutoReloadVisibleOnlyExperiment"); 1137 "AutoReloadVisibleOnlyExperiment");
1145 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 1138 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
1146 if (browser_command_line.HasSwitch( 1139 if (browser_command_line.HasSwitch(
1147 switches::kEnableOfflineAutoReloadVisibleOnly)) { 1140 switches::kEnableOfflineAutoReloadVisibleOnly)) {
1148 return true; 1141 return true;
1149 } 1142 }
1150 if (browser_command_line.HasSwitch( 1143 if (browser_command_line.HasSwitch(
1151 switches::kDisableOfflineAutoReloadVisibleOnly)) { 1144 switches::kDisableOfflineAutoReloadVisibleOnly)) {
1152 return false; 1145 return false;
1153 } 1146 }
1154 return group == "Enabled"; 1147 return true;
1155 } 1148 }
1156 1149
1157 } // namespace 1150 } // namespace
1158 1151
1159 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 1152 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
1160 CommandLine* command_line, int child_process_id) { 1153 CommandLine* command_line, int child_process_id) {
1161 #if defined(OS_POSIX) 1154 #if defined(OS_POSIX)
1162 if (breakpad::IsCrashReporterEnabled()) { 1155 if (breakpad::IsCrashReporterEnabled()) {
1163 scoped_ptr<metrics::ClientInfo> client_info = 1156 scoped_ptr<metrics::ClientInfo> client_info =
1164 GoogleUpdateSettings::LoadMetricsClientInfo(); 1157 GoogleUpdateSettings::LoadMetricsClientInfo();
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 switches::kDisableWebRtcEncryption, 2589 switches::kDisableWebRtcEncryption,
2597 }; 2590 };
2598 to_command_line->CopySwitchesFrom(from_command_line, 2591 to_command_line->CopySwitchesFrom(from_command_line,
2599 kWebRtcDevSwitchNames, 2592 kWebRtcDevSwitchNames,
2600 arraysize(kWebRtcDevSwitchNames)); 2593 arraysize(kWebRtcDevSwitchNames));
2601 } 2594 }
2602 } 2595 }
2603 #endif // defined(ENABLE_WEBRTC) 2596 #endif // defined(ENABLE_WEBRTC)
2604 2597
2605 } // namespace chrome 2598 } // namespace chrome
OLDNEW
« 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