| 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.h" | 5 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 10 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 observer->OnPortalDetectionCompleted(NULL, CaptivePortalState()); | 40 observer->OnPortalDetectionCompleted(NULL, CaptivePortalState()); |
| 41 } | 41 } |
| 42 virtual void RemoveObserver(Observer* /* observer */) OVERRIDE {} | 42 virtual void RemoveObserver(Observer* /* observer */) OVERRIDE {} |
| 43 virtual CaptivePortalState GetCaptivePortalState( | 43 virtual CaptivePortalState GetCaptivePortalState( |
| 44 const std::string& /* service_path */) OVERRIDE { | 44 const std::string& /* service_path */) OVERRIDE { |
| 45 return CaptivePortalState(); | 45 return CaptivePortalState(); |
| 46 } | 46 } |
| 47 virtual bool IsEnabled() OVERRIDE { return false; } | 47 virtual bool IsEnabled() OVERRIDE { return false; } |
| 48 virtual void Enable(bool /* start_detection */) OVERRIDE {} | 48 virtual void Enable(bool /* start_detection */) OVERRIDE {} |
| 49 virtual bool StartDetectionIfIdle() OVERRIDE { return false; } | 49 virtual bool StartDetectionIfIdle() OVERRIDE { return false; } |
| 50 virtual void SetStrategy( |
| 51 PortalDetectorStrategy::StrategyId /* id */) OVERRIDE {} |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 } // namespace | 54 } // namespace |
| 53 | 55 |
| 54 void NetworkPortalDetector::InitializeForTesting( | 56 void NetworkPortalDetector::InitializeForTesting( |
| 55 NetworkPortalDetector* network_portal_detector) { | 57 NetworkPortalDetector* network_portal_detector) { |
| 56 if (network_portal_detector) { | 58 if (network_portal_detector) { |
| 57 CHECK(!g_network_portal_detector_set_for_testing) | 59 CHECK(!g_network_portal_detector_set_for_testing) |
| 58 << "NetworkPortalDetector::InitializeForTesting is called twice"; | 60 << "NetworkPortalDetector::InitializeForTesting is called twice"; |
| 59 CHECK(network_portal_detector); | 61 CHECK(network_portal_detector); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 119 } |
| 118 return kCaptivePortalStatusUnrecognized; | 120 return kCaptivePortalStatusUnrecognized; |
| 119 } | 121 } |
| 120 | 122 |
| 121 // static | 123 // static |
| 122 bool NetworkPortalDetector::IsInitialized() { | 124 bool NetworkPortalDetector::IsInitialized() { |
| 123 return g_network_portal_detector; | 125 return g_network_portal_detector; |
| 124 } | 126 } |
| 125 | 127 |
| 126 } // namespace chromeos | 128 } // namespace chromeos |
| OLD | NEW |