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

Unified Diff: components/metrics/net/net_metrics_log_uploader.cc

Issue 318203004: Make MetricsService save compressed logs to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 6 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/net/net_metrics_log_uploader.h ('k') | components/metrics/persisted_logs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/net/net_metrics_log_uploader.cc
===================================================================
--- components/metrics/net/net_metrics_log_uploader.cc (revision 276253)
+++ components/metrics/net/net_metrics_log_uploader.cc (working copy)
@@ -5,7 +5,6 @@
#include "components/metrics/net/net_metrics_log_uploader.h"
#include "base/metrics/histogram.h"
-#include "components/metrics/net/compression_utils.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_fetcher.h"
#include "url/gurl.h"
@@ -24,22 +23,8 @@
NetMetricsLogUploader::~NetMetricsLogUploader() {
}
-bool NetMetricsLogUploader::UploadLog(const std::string& log_data,
+bool NetMetricsLogUploader::UploadLog(const std::string& compressed_log_data,
const std::string& log_hash) {
- std::string compressed_log_data;
- if (!GzipCompress(log_data, &compressed_log_data)) {
- NOTREACHED();
- return false;
- }
-
- UMA_HISTOGRAM_PERCENTAGE(
- "UMA.ProtoCompressionRatio",
- static_cast<int>(100 * compressed_log_data.size() / log_data.size()));
- UMA_HISTOGRAM_CUSTOM_COUNTS(
- "UMA.ProtoGzippedKBSaved",
- static_cast<int>((log_data.size() - compressed_log_data.size()) / 1024),
- 1, 2000, 50);
-
current_fetch_.reset(
net::URLFetcher::Create(GURL(server_url_), net::URLFetcher::POST, this));
current_fetch_->SetRequestContext(request_context_getter_);
« no previous file with comments | « components/metrics/net/net_metrics_log_uploader.h ('k') | components/metrics/persisted_logs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698