| 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_DATABASE_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| 9 #define CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| 10 | 10 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // To make sure we are conservative we will return true if an error occurs. | 165 // To make sure we are conservative we will return true if an error occurs. |
| 166 // This method is expected to be called on the IO thread. | 166 // This method is expected to be called on the IO thread. |
| 167 virtual bool MatchDownloadWhitelistUrl(const GURL& url); | 167 virtual bool MatchDownloadWhitelistUrl(const GURL& url); |
| 168 | 168 |
| 169 // Check if |str| matches any of the full-length hashes from the download | 169 // Check if |str| matches any of the full-length hashes from the download |
| 170 // whitelist. Returns true if there was a match and false otherwise. | 170 // whitelist. Returns true if there was a match and false otherwise. |
| 171 // To make sure we are conservative we will return true if an error occurs. | 171 // To make sure we are conservative we will return true if an error occurs. |
| 172 // This method is expected to be called on the IO thread. | 172 // This method is expected to be called on the IO thread. |
| 173 virtual bool MatchDownloadWhitelistString(const std::string& str); | 173 virtual bool MatchDownloadWhitelistString(const std::string& str); |
| 174 | 174 |
| 175 // Check if the CSD malware IP matching kill switch is turned on. |
| 176 virtual bool MalwareKillSwitchOn(); |
| 177 |
| 175 // Called on the IO thread to cancel a pending check if the result is no | 178 // Called on the IO thread to cancel a pending check if the result is no |
| 176 // longer needed. | 179 // longer needed. |
| 177 void CancelCheck(Client* client); | 180 void CancelCheck(Client* client); |
| 178 | 181 |
| 179 // Called on the IO thread when the SafeBrowsingProtocolManager has received | 182 // Called on the IO thread when the SafeBrowsingProtocolManager has received |
| 180 // the full hash results for prefix hits detected in the database. | 183 // the full hash results for prefix hits detected in the database. |
| 181 void HandleGetHashResults( | 184 void HandleGetHashResults( |
| 182 SafeBrowsingCheck* check, | 185 SafeBrowsingCheck* check, |
| 183 const std::vector<SBFullHashResult>& full_hashes, | 186 const std::vector<SBFullHashResult>& full_hashes, |
| 184 bool can_cache); | 187 bool can_cache); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 401 |
| 399 std::deque<QueuedCheck> queued_checks_; | 402 std::deque<QueuedCheck> queued_checks_; |
| 400 | 403 |
| 401 // Timeout to use for safe browsing checks. | 404 // Timeout to use for safe browsing checks. |
| 402 base::TimeDelta check_timeout_; | 405 base::TimeDelta check_timeout_; |
| 403 | 406 |
| 404 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); | 407 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); |
| 405 }; | 408 }; |
| 406 | 409 |
| 407 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 410 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| OLD | NEW |