| 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 #pragma once | 10 #pragma once |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 protected: | 132 protected: |
| 133 Observer() {} | 133 Observer() {} |
| 134 virtual ~Observer() {} | 134 virtual ~Observer() {} |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 DISALLOW_COPY_AND_ASSIGN(Observer); | 137 DISALLOW_COPY_AND_ASSIGN(Observer); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 class Client { | 140 class Client { |
| 141 public: | 141 public: |
| 142 virtual ~Client() {} | |
| 143 | |
| 144 void OnSafeBrowsingResult(const SafeBrowsingCheck& check); | 142 void OnSafeBrowsingResult(const SafeBrowsingCheck& check); |
| 145 | 143 |
| 146 protected: | 144 protected: |
| 145 virtual ~Client() {} |
| 146 |
| 147 // Called when the result of checking a browse URL is known. | 147 // Called when the result of checking a browse URL is known. |
| 148 virtual void OnBrowseUrlCheckResult(const GURL& url, | 148 virtual void OnBrowseUrlCheckResult(const GURL& url, |
| 149 UrlCheckResult result) {} | 149 UrlCheckResult result) {} |
| 150 | 150 |
| 151 // Called when the result of checking a download URL is known. | 151 // Called when the result of checking a download URL is known. |
| 152 virtual void OnDownloadUrlCheckResult(const std::vector<GURL>& url_chain, | 152 virtual void OnDownloadUrlCheckResult(const std::vector<GURL>& url_chain, |
| 153 UrlCheckResult result) {} | 153 UrlCheckResult result) {} |
| 154 | 154 |
| 155 // Called when the result of checking a download binary hash is known. | 155 // Called when the result of checking a download binary hash is known. |
| 156 virtual void OnDownloadHashCheckResult(const std::string& hash, | 156 virtual void OnDownloadHashCheckResult(const std::string& hash, |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 class SafeBrowsingServiceFactory { | 592 class SafeBrowsingServiceFactory { |
| 593 public: | 593 public: |
| 594 SafeBrowsingServiceFactory() { } | 594 SafeBrowsingServiceFactory() { } |
| 595 virtual ~SafeBrowsingServiceFactory() { } | 595 virtual ~SafeBrowsingServiceFactory() { } |
| 596 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 596 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
| 597 private: | 597 private: |
| 598 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 598 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
| 599 }; | 599 }; |
| 600 | 600 |
| 601 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 601 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |