Chromium Code Reviews| Index: components/data_use_measurement/content/data_use_measurement.h |
| diff --git a/components/data_use_measurement/content/data_use_measurement.h b/components/data_use_measurement/content/data_use_measurement.h |
| index a5b8f7136359a70c26fe085c11fb0471549bb004..3a6c426acdbe7c5ffe1c971838263b9d8753cc84 100644 |
| --- a/components/data_use_measurement/content/data_use_measurement.h |
| +++ b/components/data_use_measurement/content/data_use_measurement.h |
| @@ -9,10 +9,12 @@ |
| #include <string> |
| +#include "base/callback.h" |
| #include "base/macros.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "build/build_config.h" |
| #include "components/data_use_measurement/core/data_use_user_data.h" |
| +#include "components/metrics/data_use_tracker.h" |
|
gayane -on leave until 09-2017
2016/04/01 20:34:44
The only reason we have this dependency is because
Alexei Svitkine (slow)
2016/04/01 20:40:32
Yeah I thought of this too. I'm ok with this, but
|
| #if defined(OS_ANDROID) |
| #include "base/android/application_status_listener.h" |
| @@ -32,7 +34,8 @@ namespace data_use_measurement { |
| // http://crbug.com/527460 |
| class DataUseMeasurement { |
| public: |
| - DataUseMeasurement(); |
| + explicit DataUseMeasurement( |
| + const metrics::UpdateUsagePrefCallbackType& metrics_data_use_forwarder); |
| ~DataUseMeasurement(); |
| // Records the data use of the |request|, thus |request| must be non-null. |
| @@ -63,7 +66,9 @@ class DataUseMeasurement { |
| // ("Downstream") path, whether the app was in the "Foreground" or |
| // "Background", and whether a "Cellular" or "WiFi" network was use. For |
| // example, "Prefix.Upstream.Foreground.Cellular" is a possible output. |
| - std::string GetHistogramName(const char* prefix, TrafficDirection dir) const; |
| + std::string GetHistogramName(const char* prefix, |
| + TrafficDirection dir, |
| + bool is_conn_cellular) const; |
| #if defined(OS_ANDROID) |
| // Called whenever the application transitions from foreground to background |
| @@ -79,8 +84,12 @@ class DataUseMeasurement { |
| void ReportDataUsageServices( |
| data_use_measurement::DataUseUserData::ServiceName service, |
| TrafficDirection dir, |
| + bool is_conn_cellular, |
| int64_t message_size) const; |
| + // Callback for updating data use prefs. |
| + metrics::UpdateUsagePrefCallbackType metrics_data_use_forwarder_; |
| + |
| #if defined(OS_ANDROID) |
| // Application listener store the last known state of the application in this |
| // field. |