Chromium Code Reviews| Index: chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h |
| diff --git a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h |
| index 200a4cc9be2a69c35476cf0362e7aae9ad079235..cb1e9d72714b8bc31251c8cbd309dcc1e8cc9021 100644 |
| --- a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h |
| +++ b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h |
| @@ -7,8 +7,11 @@ |
| #include "base/callback.h" |
| #include "base/macros.h" |
| +#include "base/memory/ref_counted.h" |
| #include "content/public/common/resource_type.h" |
| +class SafeBrowsingDatabaseManager; |
| + |
| namespace net { |
| class URLRequest; |
| } |
| @@ -22,7 +25,8 @@ class OffDomainInclusionDetector { |
| NO_EVENT, |
| EMPTY_MAIN_FRAME_URL, |
| INVALID_MAIN_FRAME_URL, |
| - OFF_DOMAIN_INCLUSION_DETECTED, |
| + OFF_DOMAIN_INCLUSION_WHITELISTED, |
| + OFF_DOMAIN_INCLUSION_SUSPICIOUS, |
| }; |
| // TODO(gab): Hook the OffDomainInclusionDetector to the |
| @@ -30,11 +34,13 @@ class OffDomainInclusionDetector { |
| // custom callback type. |
| typedef base::Callback<void(AnalysisEvent event)> ReportAnalysisEventCallback; |
| - OffDomainInclusionDetector(); |
| + OffDomainInclusionDetector( |
|
grt (UTC plus 2)
2015/01/07 14:35:48
explicit
gab
2015/01/07 17:52:01
Done.
|
| + const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager); |
| // Constructs an OffDomainInclusionDetector with a ReportAnalysisEventCallback |
| // to get feedback from detection events, used only in tests. |
| explicit OffDomainInclusionDetector( |
|
grt (UTC plus 2)
2015/01/07 14:35:48
no explicit
gab
2015/01/07 17:52:01
Done.
|
| + const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager, |
| const ReportAnalysisEventCallback& report_analysis_event_callback); |
| ~OffDomainInclusionDetector(); |
| @@ -44,6 +50,8 @@ class OffDomainInclusionDetector { |
| void OnResourceRequest(const net::URLRequest* request); |
| private: |
| + scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; |
| + |
| const ReportAnalysisEventCallback report_analysis_event_callback_; |
| DISALLOW_COPY_AND_ASSIGN(OffDomainInclusionDetector); |