| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
| 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
| 7 | 7 |
| 8 // A class that provides the interface between the SafeBrowsing protocol manager | 8 // A class that provides the interface between the SafeBrowsing protocol manager |
| 9 // and database that holds the downloaded updates. | 9 // and database that holds the downloaded updates. |
| 10 | 10 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // these stores. | 258 // these stores. |
| 259 bool AreStoresAvailableNow(const StoresToCheck& stores_to_check) const; | 259 bool AreStoresAvailableNow(const StoresToCheck& stores_to_check) const; |
| 260 | 260 |
| 261 // The base directory under which to create the files that contain hashes. | 261 // The base directory under which to create the files that contain hashes. |
| 262 const base::FilePath base_path_; | 262 const base::FilePath base_path_; |
| 263 | 263 |
| 264 // Called when the V4Database has finished applying the latest update and is | 264 // Called when the V4Database has finished applying the latest update and is |
| 265 // ready to process next update. | 265 // ready to process next update. |
| 266 DatabaseUpdatedCallback db_updated_callback_; | 266 DatabaseUpdatedCallback db_updated_callback_; |
| 267 | 267 |
| 268 // Whether the service is running. | |
| 269 bool enabled_; | |
| 270 | |
| 271 // The list of stores to manage (for hash prefixes and full hashes). Each | 268 // The list of stores to manage (for hash prefixes and full hashes). Each |
| 272 // element contains the identifier for the store, the corresponding | 269 // element contains the identifier for the store, the corresponding |
| 273 // SBThreatType, whether to fetch hash prefixes for that store, and the | 270 // SBThreatType, whether to fetch hash prefixes for that store, and the |
| 274 // name of the file on disk that would contain the prefixes, if applicable. | 271 // name of the file on disk that would contain the prefixes, if applicable. |
| 275 ListInfos list_infos_; | 272 ListInfos list_infos_; |
| 276 | 273 |
| 277 // The checks awaiting for a full hash response from the SafeBrowsing service. | 274 // The checks awaiting for a full hash response from the SafeBrowsing service. |
| 278 PendingChecks pending_checks_; | 275 PendingChecks pending_checks_; |
| 279 | 276 |
| 280 // The checks that need to be scheduled when the database becomes ready for | 277 // The checks that need to be scheduled when the database becomes ready for |
| (...skipping 12 matching lines...) Expand all Loading... |
| 293 | 290 |
| 294 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_; | 291 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_; |
| 295 | 292 |
| 296 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; | 293 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; |
| 297 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); | 294 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); |
| 298 }; // class V4LocalDatabaseManager | 295 }; // class V4LocalDatabaseManager |
| 299 | 296 |
| 300 } // namespace safe_browsing | 297 } // namespace safe_browsing |
| 301 | 298 |
| 302 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 299 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
| OLD | NEW |