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

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: Base analysis off of second-level domain only. Created 6 years, 4 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.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index c034b060d394725b87fa5112130d992058cbace8..4b600c9a66fbade233c84a60498c43d066a9ee39 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -18,10 +18,12 @@
#include "base/observer_list.h"
#include "base/sequenced_task_runner_helpers.h"
#include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callback.h"
+#include "chrome/browser/safe_browsing/off_domain_inclusion_detector.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/common/resource_type.h"
class PrefChangeRegistrar;
class PrefService;
@@ -40,6 +42,7 @@ class Thread;
}
namespace net {
+class URLRequest;
class URLRequestContext;
class URLRequestContextGetter;
}
@@ -131,6 +134,11 @@ class SafeBrowsingService
void RegisterDelayedAnalysisCallback(
const safe_browsing::DelayedAnalysisCallback& callback);
+ // Oserves resource requests made by the renderer and reports suspsicious
+ // activity.
+ void OnResourceRequest(const net::URLRequest* request,
+ content::ResourceType resource_type);
+
protected:
// Creates the safe browsing service. Need to initialize before using.
SafeBrowsingService();
@@ -247,6 +255,8 @@ class SafeBrowsingService
// both UI and IO thread.
scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
+ safe_browsing::OffDomainInclusionDetector off_domain_inclusion_detector_;
+
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService);
};

Powered by Google App Engine
This is Rietveld 408576698