| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/lock.h" | |
| 14 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "base/synchronization/lock.h" |
| 15 #include "base/task.h" | 15 #include "base/task.h" |
| 16 #include "chrome/browser/safe_browsing/safe_browsing_store.h" | 16 #include "chrome/browser/safe_browsing/safe_browsing_store.h" |
| 17 #include "testing/gtest/include/gtest/gtest_prod.h" | 17 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class Time; | 20 class Time; |
| 21 } | 21 } |
| 22 | 22 |
| 23 class BloomFilter; | 23 class BloomFilter; |
| 24 class GURL; | 24 class GURL; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 void UpdateDownloadStore(); | 229 void UpdateDownloadStore(); |
| 230 void UpdateBrowseStore(); | 230 void UpdateBrowseStore(); |
| 231 | 231 |
| 232 // Used to verify that various calls are made from the thread the | 232 // Used to verify that various calls are made from the thread the |
| 233 // object was created on. | 233 // object was created on. |
| 234 MessageLoop* creation_loop_; | 234 MessageLoop* creation_loop_; |
| 235 | 235 |
| 236 // Lock for protecting access to variables that may be used on the | 236 // Lock for protecting access to variables that may be used on the |
| 237 // IO thread. This includes |browse_bloom_filter_|, |full_browse_hashes_|, | 237 // IO thread. This includes |browse_bloom_filter_|, |full_browse_hashes_|, |
| 238 // |pending_browse_hashes_|, and |prefix_miss_cache_|. | 238 // |pending_browse_hashes_|, and |prefix_miss_cache_|. |
| 239 Lock lookup_lock_; | 239 base::Lock lookup_lock_; |
| 240 | 240 |
| 241 // Underlying persistent store for chunk data. | 241 // Underlying persistent store for chunk data. |
| 242 // For browsing related (phishing and malware URLs) chunks and prefixes. | 242 // For browsing related (phishing and malware URLs) chunks and prefixes. |
| 243 FilePath browse_filename_; | 243 FilePath browse_filename_; |
| 244 scoped_ptr<SafeBrowsingStore> browse_store_; | 244 scoped_ptr<SafeBrowsingStore> browse_store_; |
| 245 | 245 |
| 246 // For download related (download URL and binary hash) chunks and prefixes. | 246 // For download related (download URL and binary hash) chunks and prefixes. |
| 247 FilePath download_filename_; | 247 FilePath download_filename_; |
| 248 scoped_ptr<SafeBrowsingStore> download_store_; | 248 scoped_ptr<SafeBrowsingStore> download_store_; |
| 249 | 249 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 268 // Used to schedule resetting the database because of corruption. | 268 // Used to schedule resetting the database because of corruption. |
| 269 ScopedRunnableMethodFactory<SafeBrowsingDatabaseNew> reset_factory_; | 269 ScopedRunnableMethodFactory<SafeBrowsingDatabaseNew> reset_factory_; |
| 270 | 270 |
| 271 // Set if corruption is detected during the course of an update. | 271 // Set if corruption is detected during the course of an update. |
| 272 // Causes the update functions to fail with no side effects, until | 272 // Causes the update functions to fail with no side effects, until |
| 273 // the next call to |UpdateStarted()|. | 273 // the next call to |UpdateStarted()|. |
| 274 bool corruption_detected_; | 274 bool corruption_detected_; |
| 275 }; | 275 }; |
| 276 | 276 |
| 277 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_H_ | 277 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_DATABASE_H_ |
| OLD | NEW |