| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // To make sure we are conservative we will return true if an error occurs. | 158 // To make sure we are conservative we will return true if an error occurs. |
| 159 // This method is expected to be called on the IO thread. | 159 // This method is expected to be called on the IO thread. |
| 160 virtual bool MatchDownloadWhitelistUrl(const GURL& url); | 160 virtual bool MatchDownloadWhitelistUrl(const GURL& url); |
| 161 | 161 |
| 162 // Check if |str| matches any of the full-length hashes from the download | 162 // Check if |str| matches any of the full-length hashes from the download |
| 163 // whitelist. Returns true if there was a match and false otherwise. | 163 // whitelist. Returns true if there was a match and false otherwise. |
| 164 // To make sure we are conservative we will return true if an error occurs. | 164 // To make sure we are conservative we will return true if an error occurs. |
| 165 // This method is expected to be called on the IO thread. | 165 // This method is expected to be called on the IO thread. |
| 166 virtual bool MatchDownloadWhitelistString(const std::string& str); | 166 virtual bool MatchDownloadWhitelistString(const std::string& str); |
| 167 | 167 |
| 168 // Check if the CSD malware IP matching kill switch is turned on. |
| 169 virtual bool MalwareKillSwitchOn(); |
| 170 |
| 168 // Called on the IO thread to cancel a pending check if the result is no | 171 // Called on the IO thread to cancel a pending check if the result is no |
| 169 // longer needed. | 172 // longer needed. |
| 170 void CancelCheck(Client* client); | 173 void CancelCheck(Client* client); |
| 171 | 174 |
| 172 // Called on the IO thread when the SafeBrowsingProtocolManager has received | 175 // Called on the IO thread when the SafeBrowsingProtocolManager has received |
| 173 // the full hash results for prefix hits detected in the database. | 176 // the full hash results for prefix hits detected in the database. |
| 174 void HandleGetHashResults( | 177 void HandleGetHashResults( |
| 175 SafeBrowsingCheck* check, | 178 SafeBrowsingCheck* check, |
| 176 const std::vector<SBFullHashResult>& full_hashes, | 179 const std::vector<SBFullHashResult>& full_hashes, |
| 177 bool can_cache); | 180 bool can_cache); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 391 |
| 389 std::deque<QueuedCheck> queued_checks_; | 392 std::deque<QueuedCheck> queued_checks_; |
| 390 | 393 |
| 391 // Timeout to use for safe browsing checks. | 394 // Timeout to use for safe browsing checks. |
| 392 base::TimeDelta check_timeout_; | 395 base::TimeDelta check_timeout_; |
| 393 | 396 |
| 394 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); | 397 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); |
| 395 }; | 398 }; |
| 396 | 399 |
| 397 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 400 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| OLD | NEW |