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

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

Issue 516663002: Introducing the OffDomainInclusionDetector to analyze resource requests for suspicious activity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge up to r304253 Created 6 years, 1 month 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 | « chrome/browser/safe_browsing/safe_browsing_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a244c10c384f8eab9bff269b9886ff21b753665..747157a7c499d2a33b008fe23b7444582b88d140 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -30,6 +30,7 @@
#include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.h"
#include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyzer.h"
#include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h"
+#include "chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h"
#include "chrome/browser/safe_browsing/malware_details.h"
#include "chrome/browser/safe_browsing/ping_manager.h"
#include "chrome/browser/safe_browsing/protocol_manager.h"
@@ -240,6 +241,9 @@ void SafeBrowsingService::Initialize() {
incident_service_.reset(new safe_browsing::IncidentReportingService(
this, url_request_context_getter_));
}
+
+ off_domain_inclusion_detector_.reset(
+ new safe_browsing::OffDomainInclusionDetector);
#endif
// Track the safe browsing preference of existing profiles.
@@ -352,6 +356,12 @@ void SafeBrowsingService::AddDownloadManager(
#if defined(FULL_SAFE_BROWSING)
if (incident_service_)
incident_service_->AddDownloadManager(download_manager);
mattm 2014/11/14 23:40:10 bad merge (missing endif)
gab 2014/11/18 17:23:20 Done.
+}
+
+void SafeBrowsingService::OnResourceRequest(const net::URLRequest* request) {
+#if defined(FULL_SAFE_BROWSING)
+ if (off_domain_inclusion_detector_)
+ off_domain_inclusion_detector_->OnResourceRequest(request);
#endif
}
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698