| 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 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 namespace net { | 43 namespace net { |
| 44 class URLRequest; | 44 class URLRequest; |
| 45 class URLRequestContextGetter; | 45 class URLRequestContextGetter; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace safe_browsing { | 48 namespace safe_browsing { |
| 49 class ClientSideDetectionService; | 49 class ClientSideDetectionService; |
| 50 class DownloadProtectionService; | 50 class DownloadProtectionService; |
| 51 class PasswordProtectionService; |
| 51 struct ResourceRequestInfo; | 52 struct ResourceRequestInfo; |
| 52 struct SafeBrowsingProtocolConfig; | 53 struct SafeBrowsingProtocolConfig; |
| 53 class SafeBrowsingDatabaseManager; | 54 class SafeBrowsingDatabaseManager; |
| 54 class SafeBrowsingNavigationObserverManager; | 55 class SafeBrowsingNavigationObserverManager; |
| 55 class SafeBrowsingPingManager; | 56 class SafeBrowsingPingManager; |
| 56 class SafeBrowsingProtocolManager; | 57 class SafeBrowsingProtocolManager; |
| 57 class SafeBrowsingProtocolManagerDelegate; | 58 class SafeBrowsingProtocolManagerDelegate; |
| 58 class SafeBrowsingServiceFactory; | 59 class SafeBrowsingServiceFactory; |
| 59 class SafeBrowsingUIManager; | 60 class SafeBrowsingUIManager; |
| 60 class SafeBrowsingURLRequestContextGetter; | 61 class SafeBrowsingURLRequestContextGetter; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 navigation_observer_manager(); | 151 navigation_observer_manager(); |
| 151 | 152 |
| 152 SafeBrowsingProtocolManager* protocol_manager() const; | 153 SafeBrowsingProtocolManager* protocol_manager() const; |
| 153 | 154 |
| 154 SafeBrowsingPingManager* ping_manager() const; | 155 SafeBrowsingPingManager* ping_manager() const; |
| 155 | 156 |
| 156 // This may be NULL if v4 is not enabled by experiment. | 157 // This may be NULL if v4 is not enabled by experiment. |
| 157 const scoped_refptr<SafeBrowsingDatabaseManager>& v4_local_database_manager() | 158 const scoped_refptr<SafeBrowsingDatabaseManager>& v4_local_database_manager() |
| 158 const; | 159 const; |
| 159 | 160 |
| 161 PasswordProtectionService* password_protection_service(); |
| 162 |
| 160 // Returns a preference validation delegate that adds incidents to the | 163 // Returns a preference validation delegate that adds incidents to the |
| 161 // incident reporting service for validation failures. Returns NULL if the | 164 // incident reporting service for validation failures. Returns NULL if the |
| 162 // service is not applicable for the given profile. | 165 // service is not applicable for the given profile. |
| 163 std::unique_ptr<TrackedPreferenceValidationDelegate> | 166 std::unique_ptr<TrackedPreferenceValidationDelegate> |
| 164 CreatePreferenceValidationDelegate(Profile* profile) const; | 167 CreatePreferenceValidationDelegate(Profile* profile) const; |
| 165 | 168 |
| 166 // Registers |callback| to be run after some delay following process launch. | 169 // Registers |callback| to be run after some delay following process launch. |
| 167 // |callback| will be dropped if the service is not applicable for the | 170 // |callback| will be dropped if the service is not applicable for the |
| 168 // process. | 171 // process. |
| 169 void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback); | 172 void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 scoped_refptr<SafeBrowsingUIManager> ui_manager_; | 330 scoped_refptr<SafeBrowsingUIManager> ui_manager_; |
| 328 | 331 |
| 329 // The database manager handles the database and download logic. Accessed on | 332 // The database manager handles the database and download logic. Accessed on |
| 330 // both UI and IO thread. | 333 // both UI and IO thread. |
| 331 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; | 334 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; |
| 332 | 335 |
| 333 // The navigation observer manager handles download attribution. | 336 // The navigation observer manager handles download attribution. |
| 334 scoped_refptr<SafeBrowsingNavigationObserverManager> | 337 scoped_refptr<SafeBrowsingNavigationObserverManager> |
| 335 navigation_observer_manager_; | 338 navigation_observer_manager_; |
| 336 | 339 |
| 340 // The password protection service detects and handles password related |
| 341 // incidents. |
| 342 std::unique_ptr<PasswordProtectionService> password_protection_service_; |
| 343 |
| 337 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); | 344 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); |
| 338 }; | 345 }; |
| 339 | 346 |
| 340 // Factory for creating SafeBrowsingService. Useful for tests. | 347 // Factory for creating SafeBrowsingService. Useful for tests. |
| 341 class SafeBrowsingServiceFactory { | 348 class SafeBrowsingServiceFactory { |
| 342 public: | 349 public: |
| 343 SafeBrowsingServiceFactory() { } | 350 SafeBrowsingServiceFactory() { } |
| 344 virtual ~SafeBrowsingServiceFactory() { } | 351 virtual ~SafeBrowsingServiceFactory() { } |
| 345 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 352 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
| 346 private: | 353 private: |
| 347 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 354 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
| 348 }; | 355 }; |
| 349 | 356 |
| 350 } // namespace safe_browsing | 357 } // namespace safe_browsing |
| 351 | 358 |
| 352 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 359 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |