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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_service.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 | « no previous file | chrome/browser/safe_browsing/client_side_model_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/client_side_detection_service.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index 1dbb4e618c83c82d0c9657d27f97490e0e14e2c1..dbc79b355a7b985a2989c0fdc9a7aeb87352d98b 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -23,6 +23,7 @@
#include "chrome/common/safe_browsing/client_model.pb.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
@@ -290,6 +291,8 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
GetClientReportUrl(kClientReportPhishingUrl),
net::URLFetcher::POST, this));
net::URLFetcher* fetcher_ptr = fetcher.get();
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ fetcher_ptr, data_use_measurement::DataUseUserData::SAFE_BROWSING);
// Remember which callback and URL correspond to the current fetcher object.
std::unique_ptr<ClientPhishingReportInfo> info(new ClientPhishingReportInfo);
@@ -333,6 +336,8 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
GetClientReportUrl(kClientReportMalwareUrl),
net::URLFetcher::POST, this));
net::URLFetcher* fetcher_ptr = fetcher.get();
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ fetcher_ptr, data_use_measurement::DataUseUserData::SAFE_BROWSING);
// Remember which callback and URL correspond to the current fetcher object.
std::unique_ptr<ClientMalwareReportInfo> info(new ClientMalwareReportInfo);
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_model_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698