OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/base/network_change_notifier.h" | 5 #include "net/base/network_change_notifier.h" |
6 #include "net/base/network_change_notifier_factory.h" | 6 #include "net/base/network_change_notifier_factory.h" |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include "net/base/network_change_notifier_win.h" | 9 #include "net/base/network_change_notifier_win.h" |
10 #elif defined(OS_LINUX) | 10 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) |
11 #include "net/base/network_change_notifier_linux.h" | 11 #include "net/base/network_change_notifier_linux.h" |
12 #elif defined(OS_MACOSX) | 12 #elif defined(OS_MACOSX) |
13 #include "net/base/network_change_notifier_mac.h" | 13 #include "net/base/network_change_notifier_mac.h" |
14 #endif | 14 #endif |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // The actual singleton notifier. The class contract forbids usage of the API | 20 // The actual singleton notifier. The class contract forbids usage of the API |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 DCHECK(g_network_change_notifier); | 163 DCHECK(g_network_change_notifier); |
164 g_network_change_notifier = NULL; | 164 g_network_change_notifier = NULL; |
165 } | 165 } |
166 | 166 |
167 NetworkChangeNotifier::DisableForTest::~DisableForTest() { | 167 NetworkChangeNotifier::DisableForTest::~DisableForTest() { |
168 DCHECK(!g_network_change_notifier); | 168 DCHECK(!g_network_change_notifier); |
169 g_network_change_notifier = network_change_notifier_; | 169 g_network_change_notifier = network_change_notifier_; |
170 } | 170 } |
171 | 171 |
172 } // namespace net | 172 } // namespace net |
OLD | NEW |