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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 class URLRequestContextGetter; | 52 class URLRequestContextGetter; |
53 } | 53 } |
54 | 54 |
55 namespace safe_browsing { | 55 namespace safe_browsing { |
56 class ClientSideDetectionService; | 56 class ClientSideDetectionService; |
57 class DownloadProtectionService; | 57 class DownloadProtectionService; |
58 | 58 |
59 #if defined(FULL_SAFE_BROWSING) | 59 #if defined(FULL_SAFE_BROWSING) |
60 class IncidentReportingService; | 60 class IncidentReportingService; |
61 class OffDomainInclusionDetector; | 61 class OffDomainInclusionDetector; |
| 62 class ScriptRequestDetector; |
62 #endif | 63 #endif |
63 } | 64 } |
64 | 65 |
65 // Construction needs to happen on the main thread. | 66 // Construction needs to happen on the main thread. |
66 // The SafeBrowsingService owns both the UI and Database managers which do | 67 // The SafeBrowsingService owns both the UI and Database managers which do |
67 // the heavylifting of safebrowsing service. Both of these managers stay | 68 // the heavylifting of safebrowsing service. Both of these managers stay |
68 // alive until SafeBrowsingService is destroyed, however, they are disabled | 69 // alive until SafeBrowsingService is destroyed, however, they are disabled |
69 // permanently when Shutdown method is called. | 70 // permanently when Shutdown method is called. |
70 class SafeBrowsingService | 71 class SafeBrowsingService |
71 : public base::RefCountedThreadSafe< | 72 : public base::RefCountedThreadSafe< |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // thread. | 261 // thread. |
261 scoped_refptr<SafeBrowsingUIManager> ui_manager_; | 262 scoped_refptr<SafeBrowsingUIManager> ui_manager_; |
262 | 263 |
263 // The database manager handles the database and download logic. Accessed on | 264 // The database manager handles the database and download logic. Accessed on |
264 // both UI and IO thread. | 265 // both UI and IO thread. |
265 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; | 266 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; |
266 | 267 |
267 #if defined(FULL_SAFE_BROWSING) | 268 #if defined(FULL_SAFE_BROWSING) |
268 scoped_ptr<safe_browsing::OffDomainInclusionDetector> | 269 scoped_ptr<safe_browsing::OffDomainInclusionDetector> |
269 off_domain_inclusion_detector_; | 270 off_domain_inclusion_detector_; |
| 271 |
| 272 scoped_ptr<safe_browsing::ScriptRequestDetector> script_request_detector_; |
270 #endif | 273 #endif |
271 | 274 |
272 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); | 275 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); |
273 }; | 276 }; |
274 | 277 |
275 // Factory for creating SafeBrowsingService. Useful for tests. | 278 // Factory for creating SafeBrowsingService. Useful for tests. |
276 class SafeBrowsingServiceFactory { | 279 class SafeBrowsingServiceFactory { |
277 public: | 280 public: |
278 SafeBrowsingServiceFactory() { } | 281 SafeBrowsingServiceFactory() { } |
279 virtual ~SafeBrowsingServiceFactory() { } | 282 virtual ~SafeBrowsingServiceFactory() { } |
280 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 283 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
281 private: | 284 private: |
282 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 285 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
283 }; | 286 }; |
284 | 287 |
285 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 288 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
OLD | NEW |