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 | 6 |
7 #include <limits> | 7 #include <limits> |
| 8 #include <unordered_set> |
8 | 9 |
9 #include "base/macros.h" | 10 #include "base/macros.h" |
10 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
11 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
12 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
13 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
14 #include "build/build_config.h" | 15 #include "build/build_config.h" |
15 #include "net/base/network_change_notifier_factory.h" | 16 #include "net/base/network_change_notifier_factory.h" |
16 #include "net/base/network_interfaces.h" | 17 #include "net/base/network_interfaces.h" |
17 #include "net/base/url_util.h" | 18 #include "net/base/url_util.h" |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) | 522 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) |
522 // ChromeOS and Android builds MUST use their own class factory. | 523 // ChromeOS and Android builds MUST use their own class factory. |
523 #if !defined(OS_CHROMEOS) | 524 #if !defined(OS_CHROMEOS) |
524 // TODO(oshima): ash_shell do not have access to chromeos'es | 525 // TODO(oshima): ash_shell do not have access to chromeos'es |
525 // notifier yet. Re-enable this when chromeos'es notifier moved to | 526 // notifier yet. Re-enable this when chromeos'es notifier moved to |
526 // chromeos root directory. crbug.com/119298. | 527 // chromeos root directory. crbug.com/119298. |
527 CHECK(false); | 528 CHECK(false); |
528 #endif | 529 #endif |
529 return NULL; | 530 return NULL; |
530 #elif defined(OS_LINUX) | 531 #elif defined(OS_LINUX) |
531 return new NetworkChangeNotifierLinux(base::hash_set<std::string>()); | 532 return new NetworkChangeNotifierLinux(std::unordered_set<std::string>()); |
532 #elif defined(OS_MACOSX) | 533 #elif defined(OS_MACOSX) |
533 return new NetworkChangeNotifierMac(); | 534 return new NetworkChangeNotifierMac(); |
534 #else | 535 #else |
535 NOTIMPLEMENTED(); | 536 NOTIMPLEMENTED(); |
536 return NULL; | 537 return NULL; |
537 #endif | 538 #endif |
538 } | 539 } |
539 | 540 |
540 // static | 541 // static |
541 NetworkChangeNotifier::ConnectionType | 542 NetworkChangeNotifier::ConnectionType |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 | 1169 |
1169 NetworkChangeNotifier::DisableForTest::~DisableForTest() { | 1170 NetworkChangeNotifier::DisableForTest::~DisableForTest() { |
1170 DCHECK(!g_network_change_notifier); | 1171 DCHECK(!g_network_change_notifier); |
1171 g_network_change_notifier = network_change_notifier_; | 1172 g_network_change_notifier = network_change_notifier_; |
1172 } | 1173 } |
1173 | 1174 |
1174 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { | 1175 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { |
1175 } | 1176 } |
1176 | 1177 |
1177 } // namespace net | 1178 } // namespace net |
OLD | NEW |