| 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 // Safe Browsing Database Manager implementation that manages a local | 5 // Safe Browsing Database Manager implementation that manages a local |
| 6 // database. This is used by Desktop Chromium. | 6 // database. This is used by Desktop Chromium. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ |
| 9 #define CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ |
| 10 | 10 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 // Used for issuing only one GetHash request for a given prefix. | 323 // Used for issuing only one GetHash request for a given prefix. |
| 324 GetHashRequests gethash_requests_; | 324 GetHashRequests gethash_requests_; |
| 325 | 325 |
| 326 // The persistent database. We don't use a std::unique_ptr because it | 326 // The persistent database. We don't use a std::unique_ptr because it |
| 327 // needs to be destroyed on a different thread than this object. | 327 // needs to be destroyed on a different thread than this object. |
| 328 SafeBrowsingDatabase* database_; | 328 SafeBrowsingDatabase* database_; |
| 329 | 329 |
| 330 // Lock used to prevent possible data races due to compiler optimizations. | 330 // Lock used to prevent possible data races due to compiler optimizations. |
| 331 mutable base::Lock database_lock_; | 331 mutable base::Lock database_lock_; |
| 332 | 332 |
| 333 // Whether the service is running. 'enabled_' is used by the | |
| 334 // SafeBrowsingDatabaseManager on the IO thread during normal operations. | |
| 335 bool enabled_; | |
| 336 | |
| 337 // Indicate if download_protection is enabled by command switch | 333 // Indicate if download_protection is enabled by command switch |
| 338 // so we allow this feature to be exercised. | 334 // so we allow this feature to be exercised. |
| 339 bool enable_download_protection_; | 335 bool enable_download_protection_; |
| 340 | 336 |
| 341 // Indicate if client-side phishing detection whitelist should be enabled | 337 // Indicate if client-side phishing detection whitelist should be enabled |
| 342 // or not. | 338 // or not. |
| 343 bool enable_csd_whitelist_; | 339 bool enable_csd_whitelist_; |
| 344 | 340 |
| 345 // Indicate if the download whitelist should be enabled or not. | 341 // Indicate if the download whitelist should be enabled or not. |
| 346 bool enable_download_whitelist_; | 342 bool enable_download_whitelist_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 375 | 371 |
| 376 // Timeout to use for safe browsing checks. | 372 // Timeout to use for safe browsing checks. |
| 377 base::TimeDelta check_timeout_; | 373 base::TimeDelta check_timeout_; |
| 378 | 374 |
| 379 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager); | 375 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager); |
| 380 }; // class LocalSafeBrowsingDatabaseManager | 376 }; // class LocalSafeBrowsingDatabaseManager |
| 381 | 377 |
| 382 } // namespace safe_browsing | 378 } // namespace safe_browsing |
| 383 | 379 |
| 384 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ | 380 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ |
| OLD | NEW |