Chromium Code Reviews| Index: chrome/browser/metrics/metrics_service.cc |
| =================================================================== |
| --- chrome/browser/metrics/metrics_service.cc (revision 228712) |
| +++ chrome/browser/metrics/metrics_service.cc (working copy) |
| @@ -1463,6 +1463,10 @@ |
| 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()); |
|
Ilya Sherman
2013/10/16 18:26:14
nit: Why does the hash need to be hex-encoded? If
Ilya Sherman
2013/10/16 18:26:14
Please consider adding a DCHECK to verify that the
Alexei Svitkine (slow)
2013/10/16 19:31:46
Done.
Alexei Svitkine (slow)
2013/10/16 19:31:46
The SHA1 hash returned by the API we're using the
|
| + current_fetch_->AddExtraRequestHeader("X-Chrome-UMA-Log-SHA1: " + hash); |
| UMA_HISTOGRAM_PERCENTAGE( |
| "UMA.ProtoCompressionRatio", |
| 100 * compressed_log_text.size() / log_text.size()); |