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

Unified Diff: components/metrics/net/network_metrics_provider.h

Issue 922383003: Enable UMA log uploads for cellular networks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments fixed Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/net/network_metrics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/net/network_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698