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

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

Issue 318213002: Add custom interstitial for captive portals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android builds Created 5 years, 11 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
diff --git a/chrome/browser/captive_portal/captive_portal_service.cc b/chrome/browser/captive_portal/captive_portal_service.cc
index a77dd76ce44155efb3ff0a63062a2a4b9ba3494a..dd3bff4daac51d9d21be2f9d3ff96712b3caa177 100644
--- a/chrome/browser/captive_portal/captive_portal_service.cc
+++ b/chrome/browser/captive_portal/captive_portal_service.cc
@@ -210,6 +210,10 @@ CaptivePortalService::~CaptivePortalService() {
void CaptivePortalService::DetectCaptivePortal() {
DCHECK(CalledOnValidThread());
+ // Detection should be disabled only in tests.
+ if (testing_state_ == IGNORE_REQUESTS_FOR_TESTING)
+ return;
+
// If a request is pending or running, do nothing.
if (state_ == STATE_CHECKING_FOR_PORTAL || state_ == STATE_TIMER_RUNNING)
return;
@@ -352,6 +356,7 @@ void CaptivePortalService::UpdateEnabledState() {
resolve_errors_with_web_service_.GetValue();
if (testing_state_ != SKIP_OS_CHECK_FOR_TESTING &&
+ testing_state_ != IGNORE_REQUESTS_FOR_TESTING &&
ShouldDeferToNativeCaptivePortalDetection()) {
enabled_ = false;
}
« no previous file with comments | « chrome/browser/captive_portal/captive_portal_service.h ('k') | chrome/browser/captive_portal/captive_portal_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698