Chromium Code Reviews| 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 358cfa2cd88d3196302dd707046bafb61c15b277..a79607e2ef7fa548e07749aa84993c6156d3eaf6 100644 |
| --- a/chrome/browser/safe_browsing/safe_browsing_service.cc |
| +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc |
| @@ -56,6 +56,7 @@ |
| #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/incident_reporting/script_request_detector.h" |
| #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signature_analyzer.h" |
| #endif |
| @@ -231,6 +232,9 @@ void SafeBrowsingService::Initialize() { |
| if (IsIncidentReportingServiceEnabled()) { |
| incident_service_.reset(new safe_browsing::IncidentReportingService( |
| this, url_request_context_getter_)); |
| + script_request_detector_.reset( |
| + new safe_browsing::ScriptRequestDetector( |
| + incident_service_->GetIncidentReceiver().Pass())); |
|
grt (UTC plus 2)
2015/02/06 15:24:55
do you need the .Pass() here? does it compile if y
robertshield
2015/02/06 22:36:48
Done.
|
| } |
| off_domain_inclusion_detector_.reset( |
| @@ -278,6 +282,9 @@ void SafeBrowsingService::ShutDown() { |
| #if defined(FULL_SAFE_BROWSING) |
| off_domain_inclusion_detector_.reset(); |
| + script_request_detector_.reset(); |
| + // Note that it is important that incident_service_ be destroyed AFTER the |
|
grt (UTC plus 2)
2015/02/06 15:24:55
why do you say that? i don't think it's true.
robertshield
2015/02/06 22:36:48
If you recall the earlier revision of the CL, it u
grt (UTC plus 2)
2015/02/06 23:37:46
Oh, right. Apologies if that comment sounded snott
|
| + // detectors. |
| incident_service_.reset(); |
| #endif |
| @@ -359,6 +366,8 @@ void SafeBrowsingService::OnResourceRequest(const net::URLRequest* request) { |
| #if defined(FULL_SAFE_BROWSING) |
| if (off_domain_inclusion_detector_) |
| off_domain_inclusion_detector_->OnResourceRequest(request); |
| + if (script_request_detector_) |
| + script_request_detector_->OnResourceRequest(request); |
| #endif |
| } |