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

Unified Diff: components/metrics/metrics_log_uploader.h

Issue 2735443003: Use StringPiece for CreateUploader/NetMetricsLogUploader params. (Closed)
Patch Set: Created 3 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/metrics_log_uploader.h
diff --git a/components/metrics/metrics_log_uploader.h b/components/metrics/metrics_log_uploader.h
index bcc46626ad51f17864d6b3418b10c151410f36e2..9831ba7c3b5b4cf556c2f2d450cf38a82e943084 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,11 @@ 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();
-
// 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

Powered by Google App Engine
This is Rietveld 408576698