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

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 26646003: MetricsService: Send a hash of the UMA log in a header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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: chrome/browser/metrics/metrics_service.cc
===================================================================
--- chrome/browser/metrics/metrics_service.cc (revision 229433)
+++ chrome/browser/metrics/metrics_service.cc (working copy)
@@ -1463,6 +1463,11 @@
current_fetch_->SetUploadData(kMimeType, compressed_log_text);
// Tell the server that we're uploading gzipped protobufs.
current_fetch_->SetExtraRequestHeaders("content-encoding: gzip");
+ const std::string hash =
+ base::HexEncode(log_manager_.staged_log_hash().data(),
+ log_manager_.staged_log_hash().size());
+ DCHECK(!hash.empty());
+ current_fetch_->AddExtraRequestHeader("X-Chrome-UMA-Log-SHA1: " + hash);
UMA_HISTOGRAM_PERCENTAGE(
"UMA.ProtoCompressionRatio",
100 * compressed_log_text.size() / log_text.size());
« no previous file with comments | « chrome/browser/metrics/metrics_log_serializer_unittest.cc ('k') | chrome/common/metrics/metrics_log_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698