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

Unified Diff: chrome/browser/captive_portal/captive_portal_service.cc

Issue 10795038: Enable captive portal detection by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 8 years, 5 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
Index: chrome/browser/captive_portal/captive_portal_service.cc
===================================================================
--- chrome/browser/captive_portal/captive_portal_service.cc (revision 147935)
+++ chrome/browser/captive_portal/captive_portal_service.cc (working copy)
@@ -326,9 +326,21 @@
void CaptivePortalService::UpdateEnabledState() {
bool enabled_before = enabled_;
- enabled_ = resolve_errors_with_web_service_.GetValue() &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kCaptivePortalDetection);
+
+ // Default value.
+ bool allowed_by_command_line = true;
+
+ std::string command_line_value =
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kCaptivePortalDetection);
+ if (command_line_value == switches::kCaptivePortalDetectionDisabled) {
+ allowed_by_command_line = false;
+ } else if (command_line_value == switches::kCaptivePortalDetectionEnabled) {
+ allowed_by_command_line = true;
+ }
+
+ enabled_ = allowed_by_command_line &&
+ resolve_errors_with_web_service_.GetValue();
if (enabled_before == enabled_)
return;

Powered by Google App Engine
This is Rietveld 408576698