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

Unified Diff: components/metrics/metrics_log_uploader.h

Issue 2735443003: Use StringPiece for CreateUploader/NetMetricsLogUploader params. (Closed)
Patch Set: Nit and Rebase Created 3 years, 9 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/BUILD.gn ('k') | components/metrics/metrics_log_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_log_uploader.h
diff --git a/components/metrics/metrics_log_uploader.h b/components/metrics/metrics_log_uploader.h
index bcc46626ad51f17864d6b3418b10c151410f36e2..55e6d5aaa451c883b60bbc82e97906ebcfce8b0f 100644
--- a/components/metrics/metrics_log_uploader.h
+++ b/components/metrics/metrics_log_uploader.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/strings/string_piece.h"
namespace metrics {
@@ -23,34 +24,13 @@ class MetricsLogUploader {
UKM,
};
- // Constructs the uploader that will upload logs to the specified |server_url|
- // 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();
+ virtual ~MetricsLogUploader() {}
// Uploads a log with the specified |compressed_log_data| and |log_hash|.
// |log_hash| is expected to be the hex-encoded SHA1 hash of the log data
// before compression.
virtual void UploadLog(const std::string& compressed_log_data,
const std::string& log_hash) = 0;
-
- protected:
- const std::string server_url_;
- const std::string mime_type_;
-
- // Which service type this uploads for. This is used for bandwidth
- // attribution.
- const MetricServiceType service_type_;
-
- const base::Callback<void(int)> on_upload_complete_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MetricsLogUploader);
};
} // namespace metrics
« no previous file with comments | « components/metrics/BUILD.gn ('k') | components/metrics/metrics_log_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698