Chromium Code Reviews| Index: components/metrics/net/network_metrics_provider.h |
| diff --git a/components/metrics/net/network_metrics_provider.h b/components/metrics/net/network_metrics_provider.h |
| index 412ef67e5ba1f399a2f8db86b24b8904e621586c..78c6012caaf582852fa44e432db4f3ee4d3a8199 100644 |
| --- a/components/metrics/net/network_metrics_provider.h |
| +++ b/components/metrics/net/network_metrics_provider.h |
| @@ -27,6 +27,10 @@ class NetworkMetricsProvider |
| explicit NetworkMetricsProvider(base::TaskRunner* io_task_runner); |
| ~NetworkMetricsProvider() override; |
| + // Returns callback function which can be used to get whether current |
| + // connection type is cellular. |
|
Alexei Svitkine (slow)
2015/02/23 20:18:15
Mention that the callback is bound to a weak point
gayane -on leave until 09-2017
2015/02/23 20:27:53
Done.
|
| + base::Callback<void(bool*)> GetConnectionCallback(); |
| + |
| private: |
| // MetricsProvider: |
| void OnDidCreateMetricsLog() override; |
| @@ -52,6 +56,13 @@ class NetworkMetricsProvider |
| const WifiAccessPointInfoProvider::WifiAccessPointInfo& info, |
| SystemProfileProto::Network* network_proto); |
| + // Returns true if the connection type is 2G, 3G, or 4G. |
| + bool IsCellularConnection(); |
| + |
| + // Assigns the passed |is_cellular_out| parameter based on whether current |
| + // network connection is cellular. |
| + void GetIsCellularConnection(bool* is_cellular_out); |
| + |
| // Task runner used for blocking file I/O. |
| base::TaskRunner* io_task_runner_; |