Chromium Code Reviews| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 // Indicate if the unwanted software blacklist should be enabled. | 392 // Indicate if the unwanted software blacklist should be enabled. |
| 393 bool enable_unwanted_software_blacklist_; | 393 bool enable_unwanted_software_blacklist_; |
| 394 | 394 |
| 395 // The SafeBrowsing thread that runs database operations. | 395 // The SafeBrowsing thread that runs database operations. |
| 396 // | 396 // |
| 397 // Note: Functions that run on this thread should run synchronously and return | 397 // Note: Functions that run on this thread should run synchronously and return |
| 398 // to the IO thread, not post additional tasks back to this thread, lest we | 398 // to the IO thread, not post additional tasks back to this thread, lest we |
| 399 // cause a race condition at shutdown time that leads to a database leak. | 399 // cause a race condition at shutdown time that leads to a database leak. |
| 400 scoped_ptr<base::Thread> safe_browsing_thread_; | 400 scoped_ptr<base::Thread> safe_browsing_thread_; |
| 401 | 401 |
| 402 // The sequenced task runner for this object, used to verify that its state | |
| 403 // is only ever accessed in sequence via the runner. | |
|
gab
2015/02/19 14:38:23
It's mainly used to post tasks to the safe_browsin
Alexei Svitkine (slow)
2015/02/20 15:42:44
Indeed. Updated comment.
| |
| 404 scoped_refptr<base::SequencedTaskRunner> safe_browsing_task_runner_; | |
| 405 | |
| 402 // Indicates if we're currently in an update cycle. | 406 // Indicates if we're currently in an update cycle. |
| 403 bool update_in_progress_; | 407 bool update_in_progress_; |
| 404 | 408 |
| 405 // When true, newly fetched chunks may not in the database yet since the | 409 // When true, newly fetched chunks may not in the database yet since the |
| 406 // database is still updating. | 410 // database is still updating. |
| 407 bool database_update_in_progress_; | 411 bool database_update_in_progress_; |
| 408 | 412 |
| 409 // Indicates if we're in the midst of trying to close the database. If this | 413 // Indicates if we're in the midst of trying to close the database. If this |
| 410 // is true, nothing on the IO thread should access the database. | 414 // is true, nothing on the IO thread should access the database. |
| 411 bool closing_database_; | 415 bool closing_database_; |
| 412 | 416 |
| 413 std::deque<QueuedCheck> queued_checks_; | 417 std::deque<QueuedCheck> queued_checks_; |
| 414 | 418 |
| 415 // Timeout to use for safe browsing checks. | 419 // Timeout to use for safe browsing checks. |
| 416 base::TimeDelta check_timeout_; | 420 base::TimeDelta check_timeout_; |
| 417 | 421 |
| 418 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); | 422 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); |
| 419 }; | 423 }; |
| 420 | 424 |
| 421 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 425 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| OLD | NEW |