| Index: chrome/browser/chromeos/net/network_portal_detector_impl.cc
|
| diff --git a/chrome/browser/chromeos/net/network_portal_detector_impl.cc b/chrome/browser/chromeos/net/network_portal_detector_impl.cc
|
| index d16ab5718e42d70ef61d2141b0a9c0ebb1068dfe..37b92dd5419e4e40b46b86a8353d5fb10e3e96d4 100644
|
| --- a/chrome/browser/chromeos/net/network_portal_detector_impl.cc
|
| +++ b/chrome/browser/chromeos/net/network_portal_detector_impl.cc
|
| @@ -498,7 +498,18 @@ void NetworkPortalDetectorImpl::OnAttemptCompleted(
|
| attempt_completed_report_.Report();
|
| }
|
|
|
| - state_ = STATE_IDLE;
|
| + // If Chrome portal detection successfully returns portal state, mark the
|
| + // state so that Chrome won't schedule detection actively by self.
|
| + // The exception is when portal side session expires, shill doesn't report
|
| + // network connection state changed from online to portal. Thus we enable
|
| + // Chrome's detection by still marking |state_| to STATE_IDLE.
|
| + if (result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL &&
|
| + response_code == 200 &&
|
| + (!network || network->connection_state() != shill::kStateOnline)) {
|
| + state_ = STATE_BEHIND_PORTAL_IDLE;
|
| + } else {
|
| + state_ = STATE_IDLE;
|
| + }
|
| attempt_timeout_.Cancel();
|
|
|
| CaptivePortalState state;
|
|
|