OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // The Safe Browsing service is responsible for downloading anti-phishing and | 5 // The Safe Browsing service is responsible for downloading anti-phishing and |
6 // anti-malware tables and checking urls against them. | 6 // anti-malware tables and checking urls against them. |
7 | 7 |
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 class SafeBrowsingProtocolManager; | 32 class SafeBrowsingProtocolManager; |
33 class SafeBrowsingServiceFactory; | 33 class SafeBrowsingServiceFactory; |
34 class SafeBrowsingUIManager; | 34 class SafeBrowsingUIManager; |
35 class SafeBrowsingURLRequestContextGetter; | 35 class SafeBrowsingURLRequestContextGetter; |
36 class TrackedPreferenceValidationDelegate; | 36 class TrackedPreferenceValidationDelegate; |
37 | 37 |
38 namespace base { | 38 namespace base { |
39 class Thread; | 39 class Thread; |
40 } | 40 } |
41 | 41 |
| 42 namespace content { |
| 43 class DownloadManager; |
| 44 } |
| 45 |
42 namespace net { | 46 namespace net { |
43 class URLRequestContext; | 47 class URLRequestContext; |
44 class URLRequestContextGetter; | 48 class URLRequestContextGetter; |
45 } | 49 } |
46 | 50 |
47 namespace safe_browsing { | 51 namespace safe_browsing { |
48 class ClientSideDetectionService; | 52 class ClientSideDetectionService; |
49 class DownloadProtectionService; | 53 class DownloadProtectionService; |
50 class IncidentReportingService; | 54 class IncidentReportingService; |
51 } | 55 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // service is not applicable for the given profile. | 128 // service is not applicable for the given profile. |
125 scoped_ptr<TrackedPreferenceValidationDelegate> | 129 scoped_ptr<TrackedPreferenceValidationDelegate> |
126 CreatePreferenceValidationDelegate(Profile* profile) const; | 130 CreatePreferenceValidationDelegate(Profile* profile) const; |
127 | 131 |
128 // Registers |callback| to be run after some delay following process launch. | 132 // Registers |callback| to be run after some delay following process launch. |
129 // |callback| will be dropped if the service is not applicable for the | 133 // |callback| will be dropped if the service is not applicable for the |
130 // process. | 134 // process. |
131 void RegisterDelayedAnalysisCallback( | 135 void RegisterDelayedAnalysisCallback( |
132 const safe_browsing::DelayedAnalysisCallback& callback); | 136 const safe_browsing::DelayedAnalysisCallback& callback); |
133 | 137 |
| 138 // Adds |download_manager| to the set monitored by safe browsing. |
| 139 void AddDownloadManager(content::DownloadManager* download_manager); |
| 140 |
134 protected: | 141 protected: |
135 // Creates the safe browsing service. Need to initialize before using. | 142 // Creates the safe browsing service. Need to initialize before using. |
136 SafeBrowsingService(); | 143 SafeBrowsingService(); |
137 | 144 |
138 ~SafeBrowsingService() override; | 145 ~SafeBrowsingService() override; |
139 | 146 |
140 virtual SafeBrowsingDatabaseManager* CreateDatabaseManager(); | 147 virtual SafeBrowsingDatabaseManager* CreateDatabaseManager(); |
141 | 148 |
142 virtual SafeBrowsingUIManager* CreateUIManager(); | 149 virtual SafeBrowsingUIManager* CreateUIManager(); |
143 | 150 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 class SafeBrowsingServiceFactory { | 261 class SafeBrowsingServiceFactory { |
255 public: | 262 public: |
256 SafeBrowsingServiceFactory() { } | 263 SafeBrowsingServiceFactory() { } |
257 virtual ~SafeBrowsingServiceFactory() { } | 264 virtual ~SafeBrowsingServiceFactory() { } |
258 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 265 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
259 private: | 266 private: |
260 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 267 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
261 }; | 268 }; |
262 | 269 |
263 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 270 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
OLD | NEW |