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

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: Missed the browser_tests 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 148558)
+++ chrome/browser/captive_portal/captive_portal_service.cc (working copy)
@@ -13,7 +13,6 @@
#include "base/string_number_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_service.h"
#include "net/base/load_flags.h"
@@ -95,6 +94,8 @@
} // namespace
+bool CaptivePortalService::is_disabled_for_testing_ = false;
+
class CaptivePortalService::RecheckBackoffEntry : public net::BackoffEntry {
public:
explicit RecheckBackoffEntry(CaptivePortalService* captive_portal_service)
@@ -326,9 +327,8 @@
void CaptivePortalService::UpdateEnabledState() {
bool enabled_before = enabled_;
- enabled_ = resolve_errors_with_web_service_.GetValue() &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kCaptivePortalDetection);
+ enabled_ = !is_disabled_for_testing_ &&
+ resolve_errors_with_web_service_.GetValue();
if (enabled_before == enabled_)
return;

Powered by Google App Engine
This is Rietveld 408576698