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" |
11 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" | 11 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "chromeos/chromeos_switches.h" | 13 #include "chromeos/chromeos_switches.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 const char kCaptivePortalStatusUnknown[] = "Unknown"; | 19 const char kCaptivePortalStatusUnknown[] = "Unknown"; |
20 const char kCaptivePortalStatusOffline[] = "Offline"; | 20 const char kCaptivePortalStatusOffline[] = "Offline"; |
21 const char kCaptivePortalStatusOnline[] = "Online"; | 21 const char kCaptivePortalStatusOnline[] = "Online"; |
22 const char kCaptivePortalStatusPortal[] = "Portal"; | 22 const char kCaptivePortalStatusPortal[] = "Portal"; |
23 const char kCaptivePortalStatusProxyAuthRequired[] = | 23 const char kCaptivePortalStatusProxyAuthRequired[] = "ProxyAuthRequired"; |
24 "Proxy authentication required"; | |
25 const char kCaptivePortalStatusUnrecognized[] = "Unrecognized"; | 24 const char kCaptivePortalStatusUnrecognized[] = "Unrecognized"; |
26 | 25 |
27 NetworkPortalDetector* g_network_portal_detector = NULL; | 26 NetworkPortalDetector* g_network_portal_detector = NULL; |
28 bool g_network_portal_detector_set_for_testing = false; | 27 bool g_network_portal_detector_set_for_testing = false; |
29 | 28 |
30 bool IsTestMode() { | 29 bool IsTestMode() { |
31 return CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType); | 30 return CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType); |
32 } | 31 } |
33 | 32 |
34 // Stub implementation of NetworkPortalDetector. | 33 // Stub implementation of NetworkPortalDetector. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } | 117 } |
119 return kCaptivePortalStatusUnrecognized; | 118 return kCaptivePortalStatusUnrecognized; |
120 } | 119 } |
121 | 120 |
122 // static | 121 // static |
123 bool NetworkPortalDetector::IsInitialized() { | 122 bool NetworkPortalDetector::IsInitialized() { |
124 return g_network_portal_detector; | 123 return g_network_portal_detector; |
125 } | 124 } |
126 | 125 |
127 } // namespace chromeos | 126 } // namespace chromeos |
OLD | NEW |