| 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 COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| 9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 virtual bool ChecksAreAlwaysAsync() const = 0; | 76 virtual bool ChecksAreAlwaysAsync() const = 0; |
| 77 | 77 |
| 78 // Returns true if this resource type should be checked. | 78 // Returns true if this resource type should be checked. |
| 79 virtual bool CanCheckResourceType( | 79 virtual bool CanCheckResourceType( |
| 80 content::ResourceType resource_type) const = 0; | 80 content::ResourceType resource_type) const = 0; |
| 81 | 81 |
| 82 // Returns true if the url's scheme can be checked. | 82 // Returns true if the url's scheme can be checked. |
| 83 virtual bool CanCheckUrl(const GURL& url) const = 0; | 83 virtual bool CanCheckUrl(const GURL& url) const = 0; |
| 84 | 84 |
| 85 // Returns whether download protection is enabled. | 85 // Returns whether download protection is enabled. |
| 86 virtual bool download_protection_enabled() const = 0; | 86 virtual bool IsDownloadProtectionEnabled() const = 0; |
| 87 | 87 |
| 88 // Called on the IO thread to check if the given url is safe or not. If we | 88 // Called on the IO thread to check if the given url is safe or not. If we |
| 89 // can synchronously determine that the url is safe, CheckUrl returns true. | 89 // can synchronously determine that the url is safe, CheckUrl returns true. |
| 90 // Otherwise it returns false, and "client" is called asynchronously with the | 90 // Otherwise it returns false, and "client" is called asynchronously with the |
| 91 // result when it is ready. | 91 // result when it is ready. |
| 92 virtual bool CheckBrowseUrl(const GURL& url, Client* client) = 0; | 92 virtual bool CheckBrowseUrl(const GURL& url, Client* client) = 0; |
| 93 | 93 |
| 94 // Check if the prefix for |url| is in safebrowsing download add lists. | 94 // Check if the prefix for |url| is in safebrowsing download add lists. |
| 95 // Result will be passed to callback in |client|. | 95 // Result will be passed to callback in |client|. |
| 96 virtual bool CheckDownloadUrl(const std::vector<GURL>& url_chain, | 96 virtual bool CheckDownloadUrl(const std::vector<GURL>& url_chain, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; | 176 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; |
| 177 | 177 |
| 178 // Created and destroyed via StartonIOThread/StopOnIOThread. | 178 // Created and destroyed via StartonIOThread/StopOnIOThread. |
| 179 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; | 179 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; |
| 180 }; // class SafeBrowsingDatabaseManager | 180 }; // class SafeBrowsingDatabaseManager |
| 181 | 181 |
| 182 } // namespace safe_browsing | 182 } // namespace safe_browsing |
| 183 | 183 |
| 184 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 184 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| OLD | NEW |