Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 5 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 << "name=" << network->name() << ", id=" << network->guid(); | 279 << "name=" << network->name() << ", id=" << network->guid(); |
| 280 portal_state_map_.erase(network->guid()); | 280 portal_state_map_.erase(network->guid()); |
| 281 StartDetection(); | 281 StartDetection(); |
| 282 } | 282 } |
| 283 | 283 |
| 284 NetworkPortalDetectorImpl::CaptivePortalState | 284 NetworkPortalDetectorImpl::CaptivePortalState |
| 285 NetworkPortalDetectorImpl::GetCaptivePortalState(const std::string& guid) { | 285 NetworkPortalDetectorImpl::GetCaptivePortalState(const std::string& guid) { |
| 286 DCHECK(CalledOnValidThread()); | 286 DCHECK(CalledOnValidThread()); |
| 287 CaptivePortalStateMap::const_iterator it = portal_state_map_.find(guid); | 287 CaptivePortalStateMap::const_iterator it = portal_state_map_.find(guid); |
| 288 if (it == portal_state_map_.end()) { | 288 if (it == portal_state_map_.end()) { |
| 289 VLOG(1) << "CaptivePortalState not found for: " << guid; | 289 VLOG(2) << "CaptivePortalState not found for: " << guid; |
|
stevenjb
2014/07/18 00:29:40
(This was added recently for debugging but turns o
| |
| 290 return CaptivePortalState(); | 290 return CaptivePortalState(); |
| 291 } | 291 } |
| 292 return it->second; | 292 return it->second; |
| 293 } | 293 } |
| 294 | 294 |
| 295 bool NetworkPortalDetectorImpl::StartDetectionIfIdle() { | 295 bool NetworkPortalDetectorImpl::StartDetectionIfIdle() { |
| 296 if (!is_idle()) | 296 if (!is_idle()) |
| 297 return false; | 297 return false; |
| 298 StartDetection(); | 298 StartDetection(); |
| 299 return true; | 299 return true; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 610 if (network->connection_state() != shill::kStateOnline) | 610 if (network->connection_state() != shill::kStateOnline) |
| 611 RecordDiscrepancyWithShill(network, status); | 611 RecordDiscrepancyWithShill(network, status); |
| 612 break; | 612 break; |
| 613 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT: | 613 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT: |
| 614 NOTREACHED(); | 614 NOTREACHED(); |
| 615 break; | 615 break; |
| 616 } | 616 } |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace chromeos | 619 } // namespace chromeos |
| OLD | NEW |