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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.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/incident_reporting/incident_report_uploader_impl.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
index 90fb54f78ad3d0b9478bb913256793baff8af043..59e1ee3b1e992e4b2414f061960ea66d968018a9 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
@@ -8,6 +8,7 @@
#include "base/metrics/histogram_macros.h"
#include "chrome/common/safe_browsing/csd.pb.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "google_apis/google_api_keys.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
@@ -54,6 +55,8 @@ IncidentReportUploaderImpl::IncidentReportUploaderImpl(
net::URLFetcher::POST,
this)),
time_begin_(base::TimeTicks::Now()) {
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ url_fetcher_.get(), data_use_measurement::DataUseUserData::SAFE_BROWSING);
UMA_HISTOGRAM_COUNTS("SBIRS.ReportPayloadSize", post_data.size());
url_fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE);
url_fetcher_->SetAutomaticallyRetryOn5xx(false);
« no previous file with comments | « chrome/browser/safe_browsing/download_protection_service.cc ('k') | chrome/browser/safe_browsing/ping_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698