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

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

Issue 280353002: Disable auto-reload on mobile canary and dev channels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Hard disable on mobile Created 6 years, 7 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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 { 1555 {
1556 // Enable auto-reload if this session is in the field trial or the user 1556 // Enable auto-reload if this session is in the field trial or the user
1557 // explicitly enabled it. 1557 // explicitly enabled it.
1558 bool hard_enabled = 1558 bool hard_enabled =
1559 browser_command_line.HasSwitch(switches::kEnableOfflineAutoReload); 1559 browser_command_line.HasSwitch(switches::kEnableOfflineAutoReload);
1560 bool hard_disabled = 1560 bool hard_disabled =
1561 browser_command_line.HasSwitch(switches::kDisableOfflineAutoReload); 1561 browser_command_line.HasSwitch(switches::kDisableOfflineAutoReload);
1562 if (hard_enabled) { 1562 if (hard_enabled) {
1563 command_line->AppendSwitch(switches::kEnableOfflineAutoReload); 1563 command_line->AppendSwitch(switches::kEnableOfflineAutoReload);
1564 } else if (!hard_disabled) { 1564 } else if (!hard_disabled) {
1565 std::string group =
1566 base::FieldTrialList::FindFullName("AutoReloadExperiment");
1567 #if !defined(OS_ANDROID) && !defined(OS_IOS)
1565 chrome::VersionInfo::Channel channel = 1568 chrome::VersionInfo::Channel channel =
1566 chrome::VersionInfo::GetChannel(); 1569 chrome::VersionInfo::GetChannel();
1567 #if defined(OS_ANDROID) || defined(OS_IOS)
1568 chrome::VersionInfo::Channel kForceChannel =
1569 chrome::VersionInfo::CHANNEL_DEV;
1570 #else
1571 chrome::VersionInfo::Channel kForceChannel = 1570 chrome::VersionInfo::Channel kForceChannel =
1572 chrome::VersionInfo::CHANNEL_CANARY; 1571 chrome::VersionInfo::CHANNEL_CANARY;
1572 if (channel <= kForceChannel || group == "Enabled")
1573 #else
1574 if (group == "Enabled")
1573 #endif 1575 #endif
1574 std::string group =
1575 base::FieldTrialList::FindFullName("AutoReloadExperiment");
1576 if (channel <= kForceChannel || group == "Enabled")
1577 command_line->AppendSwitch(switches::kEnableOfflineAutoReload); 1576 command_line->AppendSwitch(switches::kEnableOfflineAutoReload);
1578 } 1577 }
1579 } 1578 }
1580 1579
1581 { 1580 {
1582 // Enable load stale cache if this session is in the field trial, one 1581 // Enable load stale cache if this session is in the field trial, one
1583 // of the forced on channels, or the user explicitly enabled it. 1582 // of the forced on channels, or the user explicitly enabled it.
1584 // Note that as far as the renderer is concerned, the feature is 1583 // Note that as far as the renderer is concerned, the feature is
1585 // enabled if-and-only-if the kEnableOfflineLoadStaleCache flag 1584 // enabled if-and-only-if the kEnableOfflineLoadStaleCache flag
1586 // is on the command line; the yes/no/default behavior is only 1585 // is on the command line; the yes/no/default behavior is only
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 switches::kDisableWebRtcEncryption, 2714 switches::kDisableWebRtcEncryption,
2716 }; 2715 };
2717 to_command_line->CopySwitchesFrom(from_command_line, 2716 to_command_line->CopySwitchesFrom(from_command_line,
2718 kWebRtcDevSwitchNames, 2717 kWebRtcDevSwitchNames,
2719 arraysize(kWebRtcDevSwitchNames)); 2718 arraysize(kWebRtcDevSwitchNames));
2720 } 2719 }
2721 } 2720 }
2722 #endif // defined(ENABLE_WEBRTC) 2721 #endif // defined(ENABLE_WEBRTC)
2723 2722
2724 } // namespace chrome 2723 } // 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