| 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..ffdc017d98fe0ccd3d3e601a2b7a38cad2c9c857 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 bound to the weak pointer of the provider, which
|
| + // can be used to get whether current connection type is cellular.
|
| + 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_;
|
|
|
|
|