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

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

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: review:mattm 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
Index: chrome/browser/safe_browsing/safe_browsing_service.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index 51595489020b99caef251a19f99687e202c40443..def5fb029e2077249a81de30c6d764c7fd3707ca 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -40,6 +40,7 @@ class Thread;
}
namespace net {
+class URLRequest;
class URLRequestContext;
class URLRequestContextGetter;
}
@@ -48,6 +49,7 @@ namespace safe_browsing {
class ClientSideDetectionService;
class DownloadProtectionService;
class IncidentReportingService;
+class OffDomainInclusionDetector;
}
// Construction needs to happen on the main thread.
@@ -131,6 +133,10 @@ class SafeBrowsingService
void RegisterDelayedAnalysisCallback(
const safe_browsing::DelayedAnalysisCallback& callback);
+ // Observes resource requests made by the renderer and reports suspicious
+ // activity.
+ void OnResourceRequest(const net::URLRequest* request);
+
protected:
// Creates the safe browsing service. Need to initialize before using.
SafeBrowsingService();
@@ -247,6 +253,9 @@ class SafeBrowsingService
// both UI and IO thread.
scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
+ scoped_ptr<safe_browsing::OffDomainInclusionDetector>
+ off_domain_inclusion_detector_;
+
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService);
};

Powered by Google App Engine
This is Rietveld 408576698