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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 465673002: Get rid of forcing the load stale cache UI experiment on canary and dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
« 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 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 } 1271 }
1272 1272
1273 if (IsAutoReloadEnabled()) 1273 if (IsAutoReloadEnabled())
1274 command_line->AppendSwitch(switches::kEnableOfflineAutoReload); 1274 command_line->AppendSwitch(switches::kEnableOfflineAutoReload);
1275 if (IsAutoReloadVisibleOnlyEnabled()) { 1275 if (IsAutoReloadVisibleOnlyEnabled()) {
1276 command_line->AppendSwitch( 1276 command_line->AppendSwitch(
1277 switches::kEnableOfflineAutoReloadVisibleOnly); 1277 switches::kEnableOfflineAutoReloadVisibleOnly);
1278 } 1278 }
1279 1279
1280 { 1280 {
1281 // Enable load stale cache if this session is in the field trial, one 1281 // Enable load stale cache if this session is in the field trial or
1282 // of the forced on channels, or the user explicitly enabled it. 1282 // the user explicitly enabled it. Note that as far as the renderer
1283 // Note that as far as the renderer is concerned, the feature is 1283 // is concerned, the feature is enabled if-and-only-if the
1284 // enabled if-and-only-if the kEnableOfflineLoadStaleCache flag 1284 // kEnableOfflineLoadStaleCache flag is on the command line;
1285 // is on the command line; the yes/no/default behavior is only 1285 // the yes/no/default behavior is only at the browser command line
1286 // at the browser command line level. 1286 // level.
1287 1287
1288 // Command line switches override 1288 // Command line switches override
1289 if (browser_command_line.HasSwitch( 1289 if (browser_command_line.HasSwitch(
1290 switches::kEnableOfflineLoadStaleCache)) { 1290 switches::kEnableOfflineLoadStaleCache)) {
1291 command_line->AppendSwitch(switches::kEnableOfflineLoadStaleCache); 1291 command_line->AppendSwitch(switches::kEnableOfflineLoadStaleCache);
1292 } else if (!browser_command_line.HasSwitch( 1292 } else if (!browser_command_line.HasSwitch(
1293 switches::kDisableOfflineLoadStaleCache)) { 1293 switches::kDisableOfflineLoadStaleCache)) {
1294 std::string group = 1294 std::string group =
1295 base::FieldTrialList::FindFullName("LoadStaleCacheExperiment"); 1295 base::FieldTrialList::FindFullName("LoadStaleCacheExperiment");
1296 chrome::VersionInfo::Channel channel =
1297 chrome::VersionInfo::GetChannel();
1298 #if defined(OS_ANDROID) || defined(OS_IOS)
1299 chrome::VersionInfo::Channel force_channel =
1300 chrome::VersionInfo::CHANNEL_DEV;
1301 #else
1302 chrome::VersionInfo::Channel force_channel =
1303 chrome::VersionInfo::CHANNEL_CANARY;
1304 #endif
1305 1296
1306 if (channel <= force_channel || group == "Enabled") 1297 if (group == "Enabled")
1307 command_line->AppendSwitch(switches::kEnableOfflineLoadStaleCache); 1298 command_line->AppendSwitch(switches::kEnableOfflineLoadStaleCache);
1308 } 1299 }
1309 } 1300 }
1310 1301
1311 // Please keep this in alphabetical order. 1302 // Please keep this in alphabetical order.
1312 static const char* const kSwitchNames[] = { 1303 static const char* const kSwitchNames[] = {
1313 autofill::switches::kDisableIgnoreAutocompleteOff, 1304 autofill::switches::kDisableIgnoreAutocompleteOff,
1314 autofill::switches::kDisablePasswordGeneration, 1305 autofill::switches::kDisablePasswordGeneration,
1315 autofill::switches::kEnablePasswordGeneration, 1306 autofill::switches::kEnablePasswordGeneration,
1316 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration, 1307 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration,
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 switches::kDisableWebRtcEncryption, 2587 switches::kDisableWebRtcEncryption,
2597 }; 2588 };
2598 to_command_line->CopySwitchesFrom(from_command_line, 2589 to_command_line->CopySwitchesFrom(from_command_line,
2599 kWebRtcDevSwitchNames, 2590 kWebRtcDevSwitchNames,
2600 arraysize(kWebRtcDevSwitchNames)); 2591 arraysize(kWebRtcDevSwitchNames));
2601 } 2592 }
2602 } 2593 }
2603 #endif // defined(ENABLE_WEBRTC) 2594 #endif // defined(ENABLE_WEBRTC)
2604 2595
2605 } // namespace chrome 2596 } // 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