| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 | 477 |
| 478 const NetworkChangeCalculatorParams params_; | 478 const NetworkChangeCalculatorParams params_; |
| 479 | 479 |
| 480 // Indicates if NotifyObserversOfNetworkChange has been called yet. | 480 // Indicates if NotifyObserversOfNetworkChange has been called yet. |
| 481 bool have_announced_; | 481 bool have_announced_; |
| 482 // Last value passed to NotifyObserversOfNetworkChange. | 482 // Last value passed to NotifyObserversOfNetworkChange. |
| 483 ConnectionType last_announced_connection_type_; | 483 ConnectionType last_announced_connection_type_; |
| 484 // Value to pass to NotifyObserversOfNetworkChange when Notify is called. | 484 // Value to pass to NotifyObserversOfNetworkChange when Notify is called. |
| 485 ConnectionType pending_connection_type_; | 485 ConnectionType pending_connection_type_; |
| 486 // Used to delay notifications so duplicates can be combined. | 486 // Used to delay notifications so duplicates can be combined. |
| 487 base::OneShotTimer<NetworkChangeCalculator> timer_; | 487 base::OneShotTimer timer_; |
| 488 | 488 |
| 489 base::ThreadChecker thread_checker_; | 489 base::ThreadChecker thread_checker_; |
| 490 | 490 |
| 491 DISALLOW_COPY_AND_ASSIGN(NetworkChangeCalculator); | 491 DISALLOW_COPY_AND_ASSIGN(NetworkChangeCalculator); |
| 492 }; | 492 }; |
| 493 | 493 |
| 494 NetworkChangeNotifier::~NetworkChangeNotifier() { | 494 NetworkChangeNotifier::~NetworkChangeNotifier() { |
| 495 network_change_calculator_.reset(); | 495 network_change_calculator_.reset(); |
| 496 DCHECK_EQ(this, g_network_change_notifier); | 496 DCHECK_EQ(this, g_network_change_notifier); |
| 497 g_network_change_notifier = NULL; | 497 g_network_change_notifier = NULL; |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 | 1052 |
| 1053 NetworkChangeNotifier::DisableForTest::~DisableForTest() { | 1053 NetworkChangeNotifier::DisableForTest::~DisableForTest() { |
| 1054 DCHECK(!g_network_change_notifier); | 1054 DCHECK(!g_network_change_notifier); |
| 1055 g_network_change_notifier = network_change_notifier_; | 1055 g_network_change_notifier = network_change_notifier_; |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { | 1058 void NetworkChangeNotifier::DNSObserver::OnInitialDNSConfigRead() { |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 } // namespace net | 1061 } // namespace net |
| OLD | NEW |