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

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

Issue 307943004: Adds bluetooth connection type to NetworkChangeNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@netinfo
Patch Set: Updating spec url Created 6 years, 6 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/base/network_change_notifier.cc ('k') | tools/metrics/histograms/histograms.xml » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 case net::NetworkChangeNotifier::CONNECTION_WIFI: 43 case net::NetworkChangeNotifier::CONNECTION_WIFI:
44 return "CONNECTION_WIFI"; 44 return "CONNECTION_WIFI";
45 case net::NetworkChangeNotifier::CONNECTION_2G: 45 case net::NetworkChangeNotifier::CONNECTION_2G:
46 return "CONNECTION_2G"; 46 return "CONNECTION_2G";
47 case net::NetworkChangeNotifier::CONNECTION_3G: 47 case net::NetworkChangeNotifier::CONNECTION_3G:
48 return "CONNECTION_3G"; 48 return "CONNECTION_3G";
49 case net::NetworkChangeNotifier::CONNECTION_4G: 49 case net::NetworkChangeNotifier::CONNECTION_4G:
50 return "CONNECTION_4G"; 50 return "CONNECTION_4G";
51 case net::NetworkChangeNotifier::CONNECTION_NONE: 51 case net::NetworkChangeNotifier::CONNECTION_NONE:
52 return "CONNECTION_NONE"; 52 return "CONNECTION_NONE";
53 case net::NetworkChangeNotifier::CONNECTION_BLUETOOTH:
54 return "CONNECTION_BLUETOOTH";
53 default: 55 default:
54 return "CONNECTION_UNEXPECTED"; 56 return "CONNECTION_UNEXPECTED";
55 } 57 }
56 } 58 }
57 59
58 std::string ProxyConfigToString(const net::ProxyConfig& config) { 60 std::string ProxyConfigToString(const net::ProxyConfig& config) {
59 scoped_ptr<base::Value> config_value(config.ToValue()); 61 scoped_ptr<base::Value> config_value(config.ToValue());
60 std::string str; 62 std::string str;
61 base::JSONWriter::Write(config_value.get(), &str); 63 base::JSONWriter::Write(config_value.get(), &str);
62 return str; 64 return str;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 proxy_config_service->RemoveObserver(&net_watcher); 191 proxy_config_service->RemoveObserver(&net_watcher);
190 192
191 // Uses |network_change_notifier|. 193 // Uses |network_change_notifier|.
192 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher); 194 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher);
193 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher); 195 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher);
194 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher); 196 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher);
195 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher); 197 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher);
196 198
197 return 0; 199 return 0;
198 } 200 }
OLDNEW
« no previous file with comments | « net/base/network_change_notifier.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698