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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 } | 915 } |
916 | 916 |
917 // static | 917 // static |
918 void NetworkChangeNotifier::NotifyObserversOfNetworkChangeForTests( | 918 void NetworkChangeNotifier::NotifyObserversOfNetworkChangeForTests( |
919 ConnectionType type) { | 919 ConnectionType type) { |
920 if (g_network_change_notifier) | 920 if (g_network_change_notifier) |
921 g_network_change_notifier->NotifyObserversOfNetworkChangeImpl(type); | 921 g_network_change_notifier->NotifyObserversOfNetworkChangeImpl(type); |
922 } | 922 } |
923 | 923 |
924 // static | 924 // static |
| 925 void NetworkChangeNotifier::NotifyObserversOfSpecificNetworkChangeForTests( |
| 926 NetworkChangeType type, |
| 927 NetworkHandle network) { |
| 928 if (g_network_change_notifier) { |
| 929 g_network_change_notifier->NotifyObserversOfSpecificNetworkChangeImpl( |
| 930 type, network); |
| 931 } |
| 932 } |
| 933 |
| 934 // static |
925 void NetworkChangeNotifier::NotifyObserversOfInitialDNSConfigReadForTests() { | 935 void NetworkChangeNotifier::NotifyObserversOfInitialDNSConfigReadForTests() { |
926 if (g_network_change_notifier) | 936 if (g_network_change_notifier) |
927 g_network_change_notifier->NotifyObserversOfInitialDNSConfigReadImpl(); | 937 g_network_change_notifier->NotifyObserversOfInitialDNSConfigReadImpl(); |
928 } | 938 } |
929 | 939 |
930 // static | 940 // static |
931 void NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChangeForTests( | 941 void NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChangeForTests( |
932 double max_bandwidth_mbps, | 942 double max_bandwidth_mbps, |
933 ConnectionType type) { | 943 ConnectionType type) { |
934 if (g_network_change_notifier) { | 944 if (g_network_change_notifier) { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 | 1172 |
1163 NetworkChangeNotifier::DisableForTest::~DisableForTest() { | 1173 NetworkChangeNotifier::DisableForTest::~DisableForTest() { |
1164 DCHECK(!g_network_change_notifier); | 1174 DCHECK(!g_network_change_notifier); |
1165 g_network_change_notifier = network_change_notifier_; | 1175 g_network_change_notifier = network_change_notifier_; |
1166 } | 1176 } |
1167 | 1177 |
1168 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { | 1178 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { |
1169 } | 1179 } |
1170 | 1180 |
1171 } // namespace net | 1181 } // namespace net |
OLD | NEW |