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

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: add checks 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..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_;

Powered by Google App Engine
This is Rietveld 408576698