Chromium Code Reviews| Index: components/metrics/metrics_log_uploader.h |
| diff --git a/components/metrics/metrics_log_uploader.h b/components/metrics/metrics_log_uploader.h |
| index 2ef0cf2577e71103ffaee8431d67a6fbdaf39feb..cdd853b7c22b24bcc89227351b39bbd197a185d3 100644 |
| --- a/components/metrics/metrics_log_uploader.h |
| +++ b/components/metrics/metrics_log_uploader.h |
| @@ -16,11 +16,20 @@ namespace metrics { |
| // of MetricsService. |
| class MetricsLogUploader { |
| public: |
| + // Possible service types. This should correspond to a type from |
| + // DataUseUserData. |
| + enum MetricServiceType { |
| + UMA, |
| + UKM, |
| + }; |
| + |
| // Constructs the uploader that will upload logs to the specified |server_url| |
| - // with the given |mime_type|. The |on_upload_complete| callback will be |
| - // called with the HTTP response code of the upload or with -1 on an error. |
| + // with the given |mime_type|. The |service_type| marks which service the |
| + // data usage should be attributed to. The |on_upload_complete| callback will |
| + // be called with the HTTP response code of the upload or with -1 on an error. |
| MetricsLogUploader(const std::string& server_url, |
| const std::string& mime_type, |
| + MetricServiceType service_type, |
| const base::Callback<void(int)>& on_upload_complete); |
| virtual ~MetricsLogUploader(); |
| @@ -33,6 +42,11 @@ class MetricsLogUploader { |
| protected: |
| const std::string server_url_; |
| const std::string mime_type_; |
| + |
| + // Which service type this uploads for. This is used for bandwidth |
| + // attribution. |
| + MetricServiceType service_type_; |
|
Alexei Svitkine (slow)
2017/02/22 15:46:10
Nit: const?
rkaplow
2017/02/22 16:11:35
Done.
|
| + |
| const base::Callback<void(int)> on_upload_complete_; |
| private: |