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

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: Metrics service is not dependent on net 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
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..e5388ca876fa4eeffa018e0c37b8c0cb73e6b566 100644
--- a/components/metrics/net/network_metrics_provider.h
+++ b/components/metrics/net/network_metrics_provider.h
@@ -27,6 +27,17 @@ class NetworkMetricsProvider
explicit NetworkMetricsProvider(base::TaskRunner* io_task_runner);
~NetworkMetricsProvider() override;
+ // 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);
Alexei Svitkine (slow) 2015/02/23 18:54:06 This can be private.
gayane -on leave until 09-2017 2015/02/23 20:14:09 Done.
+
+ // Returns callback function which can be used to get whether current
+ // connection type is cellular.
+ base::Callback<void(bool*)> GetConnectionCallback();
+
private:
// MetricsProvider:
void OnDidCreateMetricsLog() override;

Powered by Google App Engine
This is Rietveld 408576698