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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc

Issue 2274243002: Add data usage tracking for data reduction proxy, precache services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
index 93178372cbbac724254e8eca305f993110a23d6a..3005c29a69620cac1d97f7d62522a8752d475235 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
@@ -13,6 +13,7 @@
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_util.h"
#include "components/data_reduction_proxy/proto/client_config.pb.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "net/base/load_flags.h"
#include "net/nqe/effective_connection_type.h"
#include "net/url_request/url_fetcher.h"
@@ -142,6 +143,9 @@ void DataReductionProxyPingbackClient::CreateFetcherForDataAndStart() {
metrics_request_.Clear();
current_fetcher_ =
net::URLFetcher::Create(pingback_url_, net::URLFetcher::POST, this);
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ current_fetcher_.get(),
+ data_use_measurement::DataUseUserData::DATA_REDUCTION_PROXY);
current_fetcher_->SetLoadFlags(net::LOAD_BYPASS_PROXY);
current_fetcher_->SetUploadData("application/x-protobuf", serialized_request);
current_fetcher_->SetRequestContext(url_request_context_);

Powered by Google App Engine
This is Rietveld 408576698