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

Unified Diff: components/policy/core/common/cloud/external_policy_data_fetcher.cc

Issue 1330443002: Report data usage UMA for Chrome services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewArchServices
Patch Set: Fix calling Init function in sync_client.cc Created 5 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/policy/core/common/cloud/external_policy_data_fetcher.cc
diff --git a/components/policy/core/common/cloud/external_policy_data_fetcher.cc b/components/policy/core/common/cloud/external_policy_data_fetcher.cc
index 7dd4988af79849e654f1c8c1c5b607f3d8d5cddb..c1621de66731faed0b502445bcbe53f8f8632a03 100644
--- a/components/policy/core/common/cloud/external_policy_data_fetcher.cc
+++ b/components/policy/core/common/cloud/external_policy_data_fetcher.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/sequenced_task_runner.h"
#include "base/stl_util.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_fetcher.h"
@@ -173,6 +174,8 @@ void ExternalPolicyDataFetcherBackend::StartJob(
net::URLFetcher* fetcher =
net::URLFetcher::Create(++last_fetch_id_, job->url, net::URLFetcher::GET,
this).release();
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ fetcher, data_use_measurement::DataUseUserData::POLICY);
fetcher->SetRequestContext(request_context_.get());
fetcher->SetLoadFlags(net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE |
net::LOAD_DO_NOT_SAVE_COOKIES |

Powered by Google App Engine
This is Rietveld 408576698