OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_METRICS_METRICS_NETWORK_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_METRICS_NETWORK_OBSERVER_H_ |
6 #define CHROME_BROWSER_METRICS_METRICS_NETWORK_OBSERVER_H_ | 6 #define CHROME_BROWSER_METRICS_METRICS_NETWORK_OBSERVER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 bool connection_type_is_ambiguous() const { | 32 bool connection_type_is_ambiguous() const { |
33 return connection_type_is_ambiguous_; | 33 return connection_type_is_ambiguous_; |
34 } | 34 } |
35 | 35 |
36 SystemProfileProto::Network::ConnectionType connection_type() const; | 36 SystemProfileProto::Network::ConnectionType connection_type() const; |
37 | 37 |
38 bool wifi_phy_layer_protocol_is_ambiguous() const { | 38 bool wifi_phy_layer_protocol_is_ambiguous() const { |
39 return wifi_phy_layer_protocol_is_ambiguous_; | 39 return wifi_phy_layer_protocol_is_ambiguous_; |
40 } | 40 } |
41 | 41 |
42 std::string network_operator_id() const { | |
43 return network_operator_id_; | |
44 } | |
45 | |
42 SystemProfileProto::Network::WifiPHYLayerProtocol | 46 SystemProfileProto::Network::WifiPHYLayerProtocol |
43 wifi_phy_layer_protocol() const; | 47 wifi_phy_layer_protocol() const; |
44 | 48 |
45 private: | 49 private: |
46 // Posts a call to net::GetWifiPHYLayerProtocol on the blocking pool. | 50 // Posts a call to net::GetWifiPHYLayerProtocol on the blocking pool. |
47 void ProbeWifiPHYLayerProtocol(); | 51 void ProbeWifiPHYLayerProtocol(); |
48 // Callback from the blocking pool with the result of | 52 // Callback from the blocking pool with the result of |
49 // net::GetWifiPHYLayerProtocol. | 53 // net::GetWifiPHYLayerProtocol. |
50 void OnWifiPHYLayerProtocolResult(net::WifiPHYLayerProtocol mode); | 54 void OnWifiPHYLayerProtocolResult(net::WifiPHYLayerProtocol mode); |
51 | 55 |
56 void GetNetworkOperatorID(); | |
57 void OnNetworkOperatorID(std::string); | |
bengr
2014/04/25 20:39:41
Can this be OnNetworkOperatorID(const std::string&
| |
58 | |
52 base::WeakPtrFactory<MetricsNetworkObserver> weak_ptr_factory_; | 59 base::WeakPtrFactory<MetricsNetworkObserver> weak_ptr_factory_; |
53 | 60 |
54 // True if |connection_type_| changed during the lifetime of the log. | 61 // True if |connection_type_| changed during the lifetime of the log. |
55 bool connection_type_is_ambiguous_; | 62 bool connection_type_is_ambiguous_; |
56 // The connection type according to net::NetworkChangeNotifier. | 63 // The connection type according to net::NetworkChangeNotifier. |
57 net::NetworkChangeNotifier::ConnectionType connection_type_; | 64 net::NetworkChangeNotifier::ConnectionType connection_type_; |
58 | 65 |
59 // True if |wifi_phy_layer_protocol_| changed during the lifetime of the log. | 66 // True if |wifi_phy_layer_protocol_| changed during the lifetime of the log. |
60 bool wifi_phy_layer_protocol_is_ambiguous_; | 67 bool wifi_phy_layer_protocol_is_ambiguous_; |
61 // The PHY mode of the currently associated access point obtained via | 68 // The PHY mode of the currently associated access point obtained via |
62 // net::GetWifiPHYLayerProtocol. | 69 // net::GetWifiPHYLayerProtocol. |
63 net::WifiPHYLayerProtocol wifi_phy_layer_protocol_; | 70 net::WifiPHYLayerProtocol wifi_phy_layer_protocol_; |
64 | 71 |
72 std::string network_operator_id_; | |
73 | |
65 DISALLOW_COPY_AND_ASSIGN(MetricsNetworkObserver); | 74 DISALLOW_COPY_AND_ASSIGN(MetricsNetworkObserver); |
66 }; | 75 }; |
67 | 76 |
68 #endif // CHROME_BROWSER_METRICS_METRICS_NETWORK_OBSERVER_H_ | 77 #endif // CHROME_BROWSER_METRICS_METRICS_NETWORK_OBSERVER_H_ |
OLD | NEW |