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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 net::URLRequestContextGetter* request_context_getter, | 265 net::URLRequestContextGetter* request_context_getter, |
266 const V4ProtocolConfig& config); | 266 const V4ProtocolConfig& config); |
267 | 267 |
268 // The callback called each time the protocol manager downloads updates | 268 // The callback called each time the protocol manager downloads updates |
269 // successfully. | 269 // successfully. |
270 void UpdateRequestCompleted( | 270 void UpdateRequestCompleted( |
271 std::unique_ptr<ParsedServerResponse> parsed_server_response); | 271 std::unique_ptr<ParsedServerResponse> parsed_server_response); |
272 | 272 |
273 // Return true if we're enabled and have loaded real data for all of | 273 // Return true if we're enabled and have loaded real data for all of |
274 // these stores. | 274 // these stores. |
275 bool AreStoresAvailableNow(const StoresToCheck& stores_to_check) const; | 275 bool AreAllStoresAvailableNow(const StoresToCheck& stores_to_check) const; |
| 276 |
| 277 // Return true if we're enabled and have loaded real data for any of |
| 278 // these stores. |
| 279 bool AreAnyStoresAvailableNow(const StoresToCheck& stores_to_check) const; |
276 | 280 |
277 // The base directory under which to create the files that contain hashes. | 281 // The base directory under which to create the files that contain hashes. |
278 const base::FilePath base_path_; | 282 const base::FilePath base_path_; |
279 | 283 |
280 // Called when the V4Database has finished applying the latest update and is | 284 // Called when the V4Database has finished applying the latest update and is |
281 // ready to process next update. | 285 // ready to process next update. |
282 DatabaseUpdatedCallback db_updated_callback_; | 286 DatabaseUpdatedCallback db_updated_callback_; |
283 | 287 |
284 // Callback to get the current extended reporting level. Needed by the update | 288 // Callback to get the current extended reporting level. Needed by the update |
285 // manager. | 289 // manager. |
(...skipping 24 matching lines...) Expand all Loading... |
310 | 314 |
311 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_; | 315 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_; |
312 | 316 |
313 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; | 317 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; |
314 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); | 318 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); |
315 }; // class V4LocalDatabaseManager | 319 }; // class V4LocalDatabaseManager |
316 | 320 |
317 } // namespace safe_browsing | 321 } // namespace safe_browsing |
318 | 322 |
319 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 323 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
OLD | NEW |