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_stub.h" | 11 #include "chrome/browser/chromeos/net/network_portal_detector_stub.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 13 #include "chromeos/chromeos_switches.h" |
13 | 14 |
14 namespace chromeos { | 15 namespace chromeos { |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 NetworkPortalDetector* g_network_portal_detector = NULL; | 19 NetworkPortalDetector* g_network_portal_detector = NULL; |
19 | 20 |
20 bool IsTestMode() { | 21 bool IsTestMode() { |
21 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType); | 22 return CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType); |
22 } | 23 } |
23 | 24 |
24 } // namespace | 25 } // namespace |
25 | 26 |
26 NetworkPortalDetector::NetworkPortalDetector() { | 27 NetworkPortalDetector::NetworkPortalDetector() { |
27 } | 28 } |
28 | 29 |
29 NetworkPortalDetector::~NetworkPortalDetector() { | 30 NetworkPortalDetector::~NetworkPortalDetector() { |
30 } | 31 } |
31 | 32 |
(...skipping 21 matching lines...) Expand all Loading... |
53 return g_network_portal_detector; | 54 return g_network_portal_detector; |
54 } | 55 } |
55 | 56 |
56 // static | 57 // static |
57 bool NetworkPortalDetector::IsEnabledInCommandLine() { | 58 bool NetworkPortalDetector::IsEnabledInCommandLine() { |
58 return !CommandLine::ForCurrentProcess()->HasSwitch( | 59 return !CommandLine::ForCurrentProcess()->HasSwitch( |
59 switches::kDisableChromeCaptivePortalDetector); | 60 switches::kDisableChromeCaptivePortalDetector); |
60 } | 61 } |
61 | 62 |
62 } // namespace chromeos | 63 } // namespace chromeos |
OLD | NEW |