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_win.h" | 5 #include "net/base/network_change_notifier_win.h" |
6 | 6 |
7 #include <iphlpapi.h> | 7 #include <iphlpapi.h> |
8 #include <winsock2.h> | 8 #include <winsock2.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "base/time.h" | 14 #include "base/time/time.h" |
15 #include "net/base/winsock_init.h" | 15 #include "net/base/winsock_init.h" |
16 #include "net/dns/dns_config_service.h" | 16 #include "net/dns/dns_config_service.h" |
17 | 17 |
18 #pragma comment(lib, "iphlpapi.lib") | 18 #pragma comment(lib, "iphlpapi.lib") |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Time between NotifyAddrChange retries, on failure. | 24 // Time between NotifyAddrChange retries, on failure. |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 return; | 301 return; |
302 } | 302 } |
303 if (last_announced_offline_) | 303 if (last_announced_offline_) |
304 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50); | 304 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50); |
305 last_announced_offline_ = current_offline; | 305 last_announced_offline_ = current_offline; |
306 | 306 |
307 NotifyObserversOfConnectionTypeChange(); | 307 NotifyObserversOfConnectionTypeChange(); |
308 } | 308 } |
309 | 309 |
310 } // namespace net | 310 } // namespace net |
OLD | NEW |