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 {} | |
52 }; | 50 }; |
53 | 51 |
54 } // namespace | 52 } // namespace |
55 | 53 |
56 void NetworkPortalDetector::InitializeForTesting( | 54 void NetworkPortalDetector::InitializeForTesting( |
57 NetworkPortalDetector* network_portal_detector) { | 55 NetworkPortalDetector* network_portal_detector) { |
58 if (network_portal_detector) { | 56 if (network_portal_detector) { |
59 CHECK(!g_network_portal_detector_set_for_testing) | 57 CHECK(!g_network_portal_detector_set_for_testing) |
60 << "NetworkPortalDetector::InitializeForTesting is called twice"; | 58 << "NetworkPortalDetector::InitializeForTesting is called twice"; |
61 CHECK(network_portal_detector); | 59 CHECK(network_portal_detector); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 117 } |
120 return kCaptivePortalStatusUnrecognized; | 118 return kCaptivePortalStatusUnrecognized; |
121 } | 119 } |
122 | 120 |
123 // static | 121 // static |
124 bool NetworkPortalDetector::IsInitialized() { | 122 bool NetworkPortalDetector::IsInitialized() { |
125 return g_network_portal_detector; | 123 return g_network_portal_detector; |
126 } | 124 } |
127 | 125 |
128 } // namespace chromeos | 126 } // namespace chromeos |
OLD | NEW |