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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_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_config_service_client.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
index f412bd0835bfd7a9344652340ab4d0e5dc5a64f8..69c9bd743300a164b5391b57977fe98445d69d24 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
@@ -26,6 +26,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/host_port_pair.h"
#include "net/base/load_flags.h"
#include "net/base/load_timing_info.h"
@@ -393,6 +394,9 @@ DataReductionProxyConfigServiceClient::GetURLFetcherForConfig(
DCHECK(thread_checker_.CalledOnValidThread());
std::unique_ptr<net::URLFetcher> fetcher(net::URLFetcher::Create(
secure_proxy_check_url, net::URLFetcher::POST, this));
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ fetcher.get(),
+ data_use_measurement::DataUseUserData::DATA_REDUCTION_PROXY);
fetcher->SetLoadFlags(net::LOAD_BYPASS_PROXY);
fetcher->SetUploadData("application/x-protobuf", request_body);
DCHECK(url_request_context_getter_);

Powered by Google App Engine
This is Rietveld 408576698