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

Unified Diff: chrome/browser/chromeos/net/network_portal_detector.cc

Issue 12263006: Fixed portal detector behaviour for proxied network. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/net/network_portal_detector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/net/network_portal_detector.cc
diff --git a/chrome/browser/chromeos/net/network_portal_detector.cc b/chrome/browser/chromeos/net/network_portal_detector.cc
index 4a2b6a51587106017b0ab5717962df32a21d13c4..0eaf23d8cb1876d07f49e7bc334ea03e496c2c38 100644
--- a/chrome/browser/chromeos/net/network_portal_detector.cc
+++ b/chrome/browser/chromeos/net/network_portal_detector.cc
@@ -36,7 +36,7 @@ const int kMinTimeBetweenAttemptsSec = 3;
const int kRequestTimeoutSec = 10;
// Delay before portal detection caused by changes in proxy settings.
-const int kProxyChangeDelayMs = 500;
+const int kProxyChangeDelayMs = 1000;
std::string CaptivePortalStatusString(
NetworkPortalDetector::CaptivePortalStatus status) {
@@ -311,12 +311,11 @@ void NetworkPortalDetector::OnPortalDetectionCompleted(
state.response_code = results.response_code;
switch (results.result) {
case captive_portal::RESULT_NO_RESPONSE:
- if (state.response_code == net::HTTP_PROXY_AUTHENTICATION_REQUIRED) {
- state.status = CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED;
- SetCaptivePortalState(active_network, state);
- } else if (attempt_count_ >= kMaxRequestAttempts) {
- // Take into account shill's detection results.
- if (active_network->restricted_pool()) {
+ if (attempt_count_ >= kMaxRequestAttempts) {
+ if (state.response_code == net::HTTP_PROXY_AUTHENTICATION_REQUIRED) {
+ state.status = CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED;
+ } else if (active_network->restricted_pool()) {
+ // Take into account shill's detection results.
state.status = CAPTIVE_PORTAL_STATUS_PORTAL;
LOG(WARNING) << "Network " << active_network->unique_id() << " "
<< "is marked as "
« no previous file with comments | « no previous file | chrome/browser/chromeos/net/network_portal_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698