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

Side by Side Diff: chrome/browser/metrics/network_metrics_provider.cc

Issue 307943004: Adds bluetooth connection type to NetworkChangeNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@netinfo
Patch Set: Everything I could find in a grep 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/metrics/network_metrics_provider.h" 5 #include "chrome/browser/metrics/network_metrics_provider.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/task_runner_util.h" 8 #include "base/task_runner_util.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 case net::NetworkChangeNotifier::CONNECTION_ETHERNET: 63 case net::NetworkChangeNotifier::CONNECTION_ETHERNET:
64 return SystemProfileProto::Network::CONNECTION_ETHERNET; 64 return SystemProfileProto::Network::CONNECTION_ETHERNET;
65 case net::NetworkChangeNotifier::CONNECTION_WIFI: 65 case net::NetworkChangeNotifier::CONNECTION_WIFI:
66 return SystemProfileProto::Network::CONNECTION_WIFI; 66 return SystemProfileProto::Network::CONNECTION_WIFI;
67 case net::NetworkChangeNotifier::CONNECTION_2G: 67 case net::NetworkChangeNotifier::CONNECTION_2G:
68 return SystemProfileProto::Network::CONNECTION_2G; 68 return SystemProfileProto::Network::CONNECTION_2G;
69 case net::NetworkChangeNotifier::CONNECTION_3G: 69 case net::NetworkChangeNotifier::CONNECTION_3G:
70 return SystemProfileProto::Network::CONNECTION_3G; 70 return SystemProfileProto::Network::CONNECTION_3G;
71 case net::NetworkChangeNotifier::CONNECTION_4G: 71 case net::NetworkChangeNotifier::CONNECTION_4G:
72 return SystemProfileProto::Network::CONNECTION_4G; 72 return SystemProfileProto::Network::CONNECTION_4G;
73 case net::NetworkChangeNotifier::CONNECTION_BLUETOOTH:
74 return SystemProfileProto::Network::CONNECTION_BLUETOOTH;
73 } 75 }
74 NOTREACHED(); 76 NOTREACHED();
75 return SystemProfileProto::Network::CONNECTION_UNKNOWN; 77 return SystemProfileProto::Network::CONNECTION_UNKNOWN;
76 } 78 }
77 79
78 SystemProfileProto::Network::WifiPHYLayerProtocol 80 SystemProfileProto::Network::WifiPHYLayerProtocol
79 NetworkMetricsProvider::GetWifiPHYLayerProtocol() const { 81 NetworkMetricsProvider::GetWifiPHYLayerProtocol() const {
80 switch (wifi_phy_layer_protocol_) { 82 switch (wifi_phy_layer_protocol_) {
81 case net::WIFI_PHY_LAYER_PROTOCOL_NONE: 83 case net::WIFI_PHY_LAYER_PROTOCOL_NONE:
82 return SystemProfileProto::Network::WIFI_PHY_LAYER_PROTOCOL_NONE; 84 return SystemProfileProto::Network::WIFI_PHY_LAYER_PROTOCOL_NONE;
(...skipping 24 matching lines...) Expand all
107 } 109 }
108 110
109 void NetworkMetricsProvider::OnWifiPHYLayerProtocolResult( 111 void NetworkMetricsProvider::OnWifiPHYLayerProtocolResult(
110 net::WifiPHYLayerProtocol mode) { 112 net::WifiPHYLayerProtocol mode) {
111 if (wifi_phy_layer_protocol_ != net::WIFI_PHY_LAYER_PROTOCOL_UNKNOWN && 113 if (wifi_phy_layer_protocol_ != net::WIFI_PHY_LAYER_PROTOCOL_UNKNOWN &&
112 mode != wifi_phy_layer_protocol_) { 114 mode != wifi_phy_layer_protocol_) {
113 wifi_phy_layer_protocol_is_ambiguous_ = true; 115 wifi_phy_layer_protocol_is_ambiguous_ = true;
114 } 116 }
115 wifi_phy_layer_protocol_ = mode; 117 wifi_phy_layer_protocol_ = mode;
116 } 118 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698