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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 1784433003: Track CTR of uncommon download warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add one more test Created 4 years, 9 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/safe_browsing_service.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 247bbe89271da7bb1195d1bb1f44a6b4eee98a26..e31bc57c178057772aea9c979fb88f38198c9b37 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -268,8 +268,8 @@ void SafeBrowsingService::Initialize() {
}
#endif // defined(SAFE_BROWSING_CSD)
- download_service_.reset(new DownloadProtectionService(
- this, url_request_context_getter_.get()));
+ download_service_.reset(CreateDownloadProtectionService(
+ url_request_context_getter_.get()));
incident_service_.reset(CreateIncidentReportingService());
resource_request_detector_.reset(new ResourceRequestDetector(
@@ -434,6 +434,11 @@ SafeBrowsingDatabaseManager* SafeBrowsingService::CreateDatabaseManager() {
}
#if defined(FULL_SAFE_BROWSING)
+DownloadProtectionService* SafeBrowsingService::CreateDownloadProtectionService(
+ net::URLRequestContextGetter* request_context_getter) {
+ return new DownloadProtectionService(this, request_context_getter);
+}
+
IncidentReportingService*
SafeBrowsingService::CreateIncidentReportingService() {
return new IncidentReportingService(
@@ -678,16 +683,16 @@ void SafeBrowsingService::RefreshState() {
#endif
}
-void SafeBrowsingService::SendDownloadRecoveryReport(
+void SafeBrowsingService::SendSerializedDownloadReport(
const std::string& report) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&SafeBrowsingService::OnSendDownloadRecoveryReport, this,
+ base::Bind(&SafeBrowsingService::OnSendSerializedDownloadReport, this,
report));
}
-void SafeBrowsingService::OnSendDownloadRecoveryReport(
+void SafeBrowsingService::OnSendSerializedDownloadReport(
const std::string& report) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (ping_manager())

Powered by Google App Engine
This is Rietveld 408576698