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

Unified Diff: components/safe_browsing_db/v4_update_protocol_manager.cc

Issue 2276933003: Add data usage tracking for safe browsing (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
« no previous file with comments | « components/safe_browsing_db/DEPS ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/v4_update_protocol_manager.cc
diff --git a/components/safe_browsing_db/v4_update_protocol_manager.cc b/components/safe_browsing_db/v4_update_protocol_manager.cc
index 6f9465bf1f3bd27c6978ae37ab94f70049dd880f..ae43b2e3b404fcbc3fd97af82a2cb15a0b1f9dc6 100644
--- a/components/safe_browsing_db/v4_update_protocol_manager.cc
+++ b/components/safe_browsing_db/v4_update_protocol_manager.cc
@@ -12,6 +12,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/rand_util.h"
#include "base/timer/timer.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "components/safe_browsing_db/safebrowsing.pb.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
@@ -286,6 +287,8 @@ void V4UpdateProtocolManager::IssueUpdateRequest() {
std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create(
url_fetcher_id_++, update_url, net::URLFetcher::GET, this);
fetcher->SetExtraRequestHeaders(headers.ToString());
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ fetcher.get(), data_use_measurement::DataUseUserData::SAFE_BROWSING);
request_.reset(fetcher.release());
« no previous file with comments | « components/safe_browsing_db/DEPS ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698