| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 10 #pragma once |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 // success, otherwise TimeoutCallback will be called. | 407 // success, otherwise TimeoutCallback will be called. |
| 408 void StartDownloadCheck(SafeBrowsingCheck* check, | 408 void StartDownloadCheck(SafeBrowsingCheck* check, |
| 409 Client* client, | 409 Client* client, |
| 410 CancelableTask* task, | 410 CancelableTask* task, |
| 411 int64 timeout_ms); | 411 int64 timeout_ms); |
| 412 | 412 |
| 413 // Adds the given entry to the whitelist. Called on the UI thread. | 413 // Adds the given entry to the whitelist. Called on the UI thread. |
| 414 void UpdateWhitelist(const UnsafeResource& resource); | 414 void UpdateWhitelist(const UnsafeResource& resource); |
| 415 | 415 |
| 416 // NotificationObserver override | 416 // NotificationObserver override |
| 417 virtual void Observe(NotificationType type, | 417 virtual void Observe(int type, |
| 418 const NotificationSource& source, | 418 const NotificationSource& source, |
| 419 const NotificationDetails& details) OVERRIDE; | 419 const NotificationDetails& details) OVERRIDE; |
| 420 | 420 |
| 421 // The factory used to instanciate a SafeBrowsingService object. | 421 // The factory used to instanciate a SafeBrowsingService object. |
| 422 // Useful for tests, so they can provide their own implementation of | 422 // Useful for tests, so they can provide their own implementation of |
| 423 // SafeBrowsingService. | 423 // SafeBrowsingService. |
| 424 static SafeBrowsingServiceFactory* factory_; | 424 static SafeBrowsingServiceFactory* factory_; |
| 425 | 425 |
| 426 CurrentChecks checks_; | 426 CurrentChecks checks_; |
| 427 | 427 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 class SafeBrowsingServiceFactory { | 489 class SafeBrowsingServiceFactory { |
| 490 public: | 490 public: |
| 491 SafeBrowsingServiceFactory() { } | 491 SafeBrowsingServiceFactory() { } |
| 492 virtual ~SafeBrowsingServiceFactory() { } | 492 virtual ~SafeBrowsingServiceFactory() { } |
| 493 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 493 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
| 494 private: | 494 private: |
| 495 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 495 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
| 496 }; | 496 }; |
| 497 | 497 |
| 498 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 498 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |