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

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

Issue 318213002: Add custom interstitial for captive portals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Expand browser tests Created 6 years 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.h
diff --git a/chrome/browser/captive_portal/captive_portal_service.h b/chrome/browser/captive_portal/captive_portal_service.h
index 66e6d1b4182049e14af547361a2e04522fe8148f..5a93b84ac05d2f862d86c31beaf91aba7d8cd4b3 100644
--- a/chrome/browser/captive_portal/captive_portal_service.h
+++ b/chrome/browser/captive_portal/captive_portal_service.h
@@ -50,6 +50,9 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe {
// Always sends the result notification asynchronously.
void DetectCaptivePortal();
+ // Enables or disables actual portal checks.
+ void SetPortalDetectionEnabledForTest(bool enabled);
mmenke 2014/12/09 22:42:26 Having both this and set_state_for_testing seems a
meacer 2014/12/10 22:48:02 I considered doing that previously but wasn't sure
+
// Returns the URL used for captive portal testing. When a captive portal is
// detected, this URL will take us to the captive portal landing page.
const GURL& test_url() const { return test_url_; }
@@ -204,6 +207,9 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe {
// Test time ticks used by unit tests.
base::TimeTicks time_ticks_for_testing_;
+ // If true, portal detection is enabled. Only false in tests.
+ bool portal_detection_enabled_;
+
DISALLOW_COPY_AND_ASSIGN(CaptivePortalService);
};

Powered by Google App Engine
This is Rietveld 408576698