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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // Called on the IO thread to cancel a pending check if the result is no | 181 // Called on the IO thread to cancel a pending check if the result is no |
182 // longer needed. | 182 // longer needed. |
183 void CancelCheck(Client* client); | 183 void CancelCheck(Client* client); |
184 | 184 |
185 // Called on the IO thread when the SafeBrowsingProtocolManager has received | 185 // Called on the IO thread when the SafeBrowsingProtocolManager has received |
186 // the full hash results for prefix hits detected in the database. | 186 // the full hash results for prefix hits detected in the database. |
187 void HandleGetHashResults(SafeBrowsingCheck* check, | 187 void HandleGetHashResults(SafeBrowsingCheck* check, |
188 const std::vector<SBFullHashResult>& full_hashes, | 188 const std::vector<SBFullHashResult>& full_hashes, |
189 const base::TimeDelta& cache_lifetime); | 189 const base::TimeDelta& cache_lifetime); |
190 | 190 |
191 // Log the user perceived delay caused by SafeBrowsing. This delay is the time | |
192 // delta starting from when we would have started reading data from the | |
193 // network, and ending when the SafeBrowsing check completes indicating that | |
194 // the current page is 'safe'. | |
195 void LogPauseDelay(base::TimeDelta time); | |
196 | |
197 // Called to initialize objects that are used on the io_thread. This may be | 191 // Called to initialize objects that are used on the io_thread. This may be |
198 // called multiple times during the life of the DatabaseManager. Should be | 192 // called multiple times during the life of the DatabaseManager. Should be |
199 // called on IO thread. | 193 // called on IO thread. |
200 void StartOnIOThread(); | 194 void StartOnIOThread(); |
201 | 195 |
202 // Called to stop or shutdown operations on the io_thread. This may be called | 196 // Called to stop or shutdown operations on the io_thread. This may be called |
203 // multiple times during the life of the DatabaseManager. Should be called | 197 // multiple times during the life of the DatabaseManager. Should be called |
204 // on IO thread. If shutdown is true, the manager is disabled permanently. | 198 // on IO thread. If shutdown is true, the manager is disabled permanently. |
205 void StopOnIOThread(bool shutdown); | 199 void StopOnIOThread(bool shutdown); |
206 | 200 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 407 |
414 std::deque<QueuedCheck> queued_checks_; | 408 std::deque<QueuedCheck> queued_checks_; |
415 | 409 |
416 // Timeout to use for safe browsing checks. | 410 // Timeout to use for safe browsing checks. |
417 base::TimeDelta check_timeout_; | 411 base::TimeDelta check_timeout_; |
418 | 412 |
419 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); | 413 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); |
420 }; | 414 }; |
421 | 415 |
422 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 416 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
OLD | NEW |