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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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/tools/fetch/fetch_client.cc ('k') | net/url_request/url_fetcher_core.cc » ('j') | 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 MessageLoopForIO network_loop; 132 MessageLoopForIO network_loop;
133 133
134 NetWatcher net_watcher; 134 NetWatcher net_watcher;
135 135
136 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier( 136 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier(
137 net::NetworkChangeNotifier::Create()); 137 net::NetworkChangeNotifier::Create());
138 138
139 // Use the network loop as the file loop also. 139 // Use the network loop as the file loop also.
140 scoped_ptr<net::ProxyConfigService> proxy_config_service( 140 scoped_ptr<net::ProxyConfigService> proxy_config_service(
141 net::ProxyService::CreateSystemProxyConfigService( 141 net::ProxyService::CreateSystemProxyConfigService(
142 network_loop.message_loop_proxy(), 142 network_loop.message_loop_proxy().get(),
143 &network_loop)); 143 &network_loop));
144 144
145 // Uses |network_change_notifier|. 145 // Uses |network_change_notifier|.
146 net::NetworkChangeNotifier::AddIPAddressObserver(&net_watcher); 146 net::NetworkChangeNotifier::AddIPAddressObserver(&net_watcher);
147 net::NetworkChangeNotifier::AddConnectionTypeObserver(&net_watcher); 147 net::NetworkChangeNotifier::AddConnectionTypeObserver(&net_watcher);
148 net::NetworkChangeNotifier::AddDNSObserver(&net_watcher); 148 net::NetworkChangeNotifier::AddDNSObserver(&net_watcher);
149 149
150 proxy_config_service->AddObserver(&net_watcher); 150 proxy_config_service->AddObserver(&net_watcher);
151 151
152 LOG(INFO) << "Initial connection type: " 152 LOG(INFO) << "Initial connection type: "
(...skipping 16 matching lines...) Expand all
169 169
170 proxy_config_service->RemoveObserver(&net_watcher); 170 proxy_config_service->RemoveObserver(&net_watcher);
171 171
172 // Uses |network_change_notifier|. 172 // Uses |network_change_notifier|.
173 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher); 173 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher);
174 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher); 174 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher);
175 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher); 175 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher);
176 176
177 return 0; 177 return 0;
178 } 178 }
OLDNEW
« no previous file with comments | « net/tools/fetch/fetch_client.cc ('k') | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698