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