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 | 8 |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 const NetworkInterfaceList& interfaces) { | 663 const NetworkInterfaceList& interfaces) { |
664 bool first = true; | 664 bool first = true; |
665 ConnectionType result = CONNECTION_NONE; | 665 ConnectionType result = CONNECTION_NONE; |
666 for (size_t i = 0; i < interfaces.size(); ++i) { | 666 for (size_t i = 0; i < interfaces.size(); ++i) { |
667 #if defined(OS_WIN) | 667 #if defined(OS_WIN) |
668 if (interfaces[i].friendly_name == "Teredo Tunneling Pseudo-Interface") | 668 if (interfaces[i].friendly_name == "Teredo Tunneling Pseudo-Interface") |
669 continue; | 669 continue; |
670 #endif | 670 #endif |
671 // Remove VMware network interfaces as they're internal and should not be | 671 // Remove VMware network interfaces as they're internal and should not be |
672 // used to determine the network connection type. | 672 // used to determine the network connection type. |
673 if (base::StringToLowerASCII(interfaces[i].friendly_name).find("vmnet") != | 673 if (base::ToLowerASCII(interfaces[i].friendly_name).find("vmnet") != |
674 std::string::npos) { | 674 std::string::npos) { |
675 continue; | 675 continue; |
676 } | 676 } |
677 if (first) { | 677 if (first) { |
678 first = false; | 678 first = false; |
679 result = interfaces[i].type; | 679 result = interfaces[i].type; |
680 } else if (result != interfaces[i].type) { | 680 } else if (result != interfaces[i].type) { |
681 return CONNECTION_UNKNOWN; | 681 return CONNECTION_UNKNOWN; |
682 } | 682 } |
683 } | 683 } |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 | 1028 |
1029 NetworkChangeNotifier::DisableForTest::~DisableForTest() { | 1029 NetworkChangeNotifier::DisableForTest::~DisableForTest() { |
1030 DCHECK(!g_network_change_notifier); | 1030 DCHECK(!g_network_change_notifier); |
1031 g_network_change_notifier = network_change_notifier_; | 1031 g_network_change_notifier = network_change_notifier_; |
1032 } | 1032 } |
1033 | 1033 |
1034 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { | 1034 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { |
1035 } | 1035 } |
1036 | 1036 |
1037 } // namespace net | 1037 } // namespace net |
OLD | NEW |