Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: net/tools/net_watcher/net_watcher.cc

Issue 1047103002: Avoid initial NetworkChangeNotifier OnDNSChanged() signal on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert an accidental test enabling Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/net.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This is a small utility that watches for and logs network changes. 5 // This is a small utility that watches for and logs network changes.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // net::NetworkChangeNotifier::ConnectionTypeObserver implementation. 96 // net::NetworkChangeNotifier::ConnectionTypeObserver implementation.
97 void OnConnectionTypeChanged( 97 void OnConnectionTypeChanged(
98 net::NetworkChangeNotifier::ConnectionType type) override { 98 net::NetworkChangeNotifier::ConnectionType type) override {
99 LOG(INFO) << "OnConnectionTypeChanged(" 99 LOG(INFO) << "OnConnectionTypeChanged("
100 << ConnectionTypeToString(type) << ")"; 100 << ConnectionTypeToString(type) << ")";
101 } 101 }
102 102
103 // net::NetworkChangeNotifier::DNSObserver implementation. 103 // net::NetworkChangeNotifier::DNSObserver implementation.
104 void OnDNSChanged() override { LOG(INFO) << "OnDNSChanged()"; } 104 void OnDNSChanged() override { LOG(INFO) << "OnDNSChanged()"; }
105 void OnInitialDNSConfigRead() override {
106 LOG(INFO) << "OnInitialDNSConfigRead()";
107 }
105 108
106 // net::NetworkChangeNotifier::NetworkChangeObserver implementation. 109 // net::NetworkChangeNotifier::NetworkChangeObserver implementation.
107 void OnNetworkChanged( 110 void OnNetworkChanged(
108 net::NetworkChangeNotifier::ConnectionType type) override { 111 net::NetworkChangeNotifier::ConnectionType type) override {
109 LOG(INFO) << "OnNetworkChanged(" 112 LOG(INFO) << "OnNetworkChanged("
110 << ConnectionTypeToString(type) << ")"; 113 << ConnectionTypeToString(type) << ")";
111 } 114 }
112 115
113 // net::ProxyConfigService::Observer implementation. 116 // net::ProxyConfigService::Observer implementation.
114 void OnProxyConfigChanged( 117 void OnProxyConfigChanged(
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 proxy_config_service->RemoveObserver(&net_watcher); 191 proxy_config_service->RemoveObserver(&net_watcher);
189 192
190 // Uses |network_change_notifier|. 193 // Uses |network_change_notifier|.
191 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher); 194 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher);
192 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher); 195 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher);
193 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher); 196 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher);
194 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher); 197 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher);
195 198
196 return 0; 199 return 0;
197 } 200 }
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698