| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 // Indicate if the extension blacklist should be enabled. | 383 // Indicate if the extension blacklist should be enabled. |
| 384 bool enable_extension_blacklist_; | 384 bool enable_extension_blacklist_; |
| 385 | 385 |
| 386 // Indicate if the side effect free whitelist should be enabled. | 386 // Indicate if the side effect free whitelist should be enabled. |
| 387 bool enable_side_effect_free_whitelist_; | 387 bool enable_side_effect_free_whitelist_; |
| 388 | 388 |
| 389 // Indicate if the csd malware IP blacklist should be enabled. | 389 // Indicate if the csd malware IP blacklist should be enabled. |
| 390 bool enable_ip_blacklist_; | 390 bool enable_ip_blacklist_; |
| 391 | 391 |
| 392 // Indicate if the unwanted software blacklist should be enabled. |
| 393 bool enable_unwanted_software_blacklist_; |
| 394 |
| 392 // The SafeBrowsing thread that runs database operations. | 395 // The SafeBrowsing thread that runs database operations. |
| 393 // | 396 // |
| 394 // 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 |
| 395 // 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 |
| 396 // 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. |
| 397 scoped_ptr<base::Thread> safe_browsing_thread_; | 400 scoped_ptr<base::Thread> safe_browsing_thread_; |
| 398 | 401 |
| 399 // Indicates if we're currently in an update cycle. | 402 // Indicates if we're currently in an update cycle. |
| 400 bool update_in_progress_; | 403 bool update_in_progress_; |
| 401 | 404 |
| 402 // When true, newly fetched chunks may not in the database yet since the | 405 // When true, newly fetched chunks may not in the database yet since the |
| 403 // database is still updating. | 406 // database is still updating. |
| 404 bool database_update_in_progress_; | 407 bool database_update_in_progress_; |
| 405 | 408 |
| 406 // Indicates if we're in the midst of trying to close the database. If this | 409 // Indicates if we're in the midst of trying to close the database. If this |
| 407 // is true, nothing on the IO thread should access the database. | 410 // is true, nothing on the IO thread should access the database. |
| 408 bool closing_database_; | 411 bool closing_database_; |
| 409 | 412 |
| 410 std::deque<QueuedCheck> queued_checks_; | 413 std::deque<QueuedCheck> queued_checks_; |
| 411 | 414 |
| 412 // Timeout to use for safe browsing checks. | 415 // Timeout to use for safe browsing checks. |
| 413 base::TimeDelta check_timeout_; | 416 base::TimeDelta check_timeout_; |
| 414 | 417 |
| 415 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); | 418 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingDatabaseManager); |
| 416 }; | 419 }; |
| 417 | 420 |
| 418 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 421 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| OLD | NEW |