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

Unified Diff: chrome/browser/safe_browsing/srt_fetcher_win.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
Index: chrome/browser/safe_browsing/srt_fetcher_win.cc
diff --git a/chrome/browser/safe_browsing/srt_fetcher_win.cc b/chrome/browser/safe_browsing/srt_fetcher_win.cc
index 34be73b084afbb7e102d8fb397041e5e9b1c4b54..cde5190d1269b69377f9a27c51d4c0208c437ed8 100644
--- a/chrome/browser/safe_browsing/srt_fetcher_win.cc
+++ b/chrome/browser/safe_browsing/srt_fetcher_win.cc
@@ -41,6 +41,7 @@
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "chrome/common/pref_names.h"
#include "components/component_updater/pref_names.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "components/prefs/pref_service.h"
#include "components/rappor/rappor_service.h"
#include "components/variations/net/variations_http_headers.h"
@@ -587,6 +588,9 @@ class SRTFetcher : public net::URLFetcherDelegate {
GURL(GetSRTDownloadURL()),
net::URLFetcher::GET,
this)) {
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ url_fetcher_.get(),
+ data_use_measurement::DataUseUserData::SAFE_BROWSING);
url_fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE);
url_fetcher_->SetMaxRetriesOn5xx(3);
url_fetcher_->SaveResponseToTemporaryFile(
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.cc ('k') | chrome/browser/safe_browsing/threat_details_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698