| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // sure we are conservative we will return true if an error occurs. This | 124 // sure we are conservative we will return true if an error occurs. This |
| 125 // method must be called on the IO thread. | 125 // method must be called on the IO thread. |
| 126 virtual bool MatchDownloadWhitelistUrl(const GURL& url) = 0; | 126 virtual bool MatchDownloadWhitelistUrl(const GURL& url) = 0; |
| 127 | 127 |
| 128 // Check if |str| matches any of the full-length hashes from the download | 128 // Check if |str| matches any of the full-length hashes from the download |
| 129 // whitelist. Returns true if there was a match and false otherwise. To make | 129 // whitelist. Returns true if there was a match and false otherwise. To make |
| 130 // sure we are conservative we will return true if an error occurs. This | 130 // sure we are conservative we will return true if an error occurs. This |
| 131 // method must be called on the IO thread. | 131 // method must be called on the IO thread. |
| 132 virtual bool MatchDownloadWhitelistString(const std::string& str) = 0; | 132 virtual bool MatchDownloadWhitelistString(const std::string& str) = 0; |
| 133 | 133 |
| 134 // Check if the |url| matches any of the full-length hashes from the off- | |
| 135 // domain inclusion whitelist. Returns true if there was a match and false | |
| 136 // otherwise. To make sure we are conservative, we will return true if an | |
| 137 // error occurs. This method must be called on the IO thread. | |
| 138 virtual bool MatchInclusionWhitelistUrl(const GURL& url) = 0; | |
| 139 | |
| 140 // Check if |str|, a lowercase DLL file name, matches any of the full-length | 134 // Check if |str|, a lowercase DLL file name, matches any of the full-length |
| 141 // hashes from the module whitelist. Returns true if there was a match and | 135 // hashes from the module whitelist. Returns true if there was a match and |
| 142 // false otherwise. To make sure we are conservative we will return true if | 136 // false otherwise. To make sure we are conservative we will return true if |
| 143 // an error occurs. This method must be called on the IO thread. | 137 // an error occurs. This method must be called on the IO thread. |
| 144 virtual bool MatchModuleWhitelistString(const std::string& str) = 0; | 138 virtual bool MatchModuleWhitelistString(const std::string& str) = 0; |
| 145 | 139 |
| 146 // Check if the CSD malware IP matching kill switch is turned on. | 140 // Check if the CSD malware IP matching kill switch is turned on. |
| 147 virtual bool IsMalwareKillSwitchOn() = 0; | 141 virtual bool IsMalwareKillSwitchOn() = 0; |
| 148 | 142 |
| 149 // Check if the CSD whitelist kill switch is turned on. | 143 // Check if the CSD whitelist kill switch is turned on. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; | 230 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; |
| 237 | 231 |
| 238 private: | 232 private: |
| 239 // Returns an iterator to the pending API check with the given |client|. | 233 // Returns an iterator to the pending API check with the given |client|. |
| 240 CurrentApiChecks::iterator FindClientApiCheck(Client* client); | 234 CurrentApiChecks::iterator FindClientApiCheck(Client* client); |
| 241 }; // class SafeBrowsingDatabaseManager | 235 }; // class SafeBrowsingDatabaseManager |
| 242 | 236 |
| 243 } // namespace safe_browsing | 237 } // namespace safe_browsing |
| 244 | 238 |
| 245 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 239 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| OLD | NEW |