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_DATABASE_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_DATABASE_H_ |
6 #define COMPONENTS_SAFE_BROWSING_DB_V4_DATABASE_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_DATABASE_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Deletes the current database and creates a new one. | 60 // Deletes the current database and creates a new one. |
61 virtual bool ResetDatabase(); | 61 virtual bool ResetDatabase(); |
62 | 62 |
63 // Makes the passed |factory| the factory used to instantiate | 63 // Makes the passed |factory| the factory used to instantiate |
64 // a V4Database. Only for tests. | 64 // a V4Database. Only for tests. |
65 static void RegisterFactoryForTest(V4DatabaseFactory* factory) { | 65 static void RegisterFactoryForTest(V4DatabaseFactory* factory) { |
66 factory_ = factory; | 66 factory_ = factory; |
67 } | 67 } |
68 | 68 |
69 private: | 69 private: |
| 70 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner_; |
| 71 |
| 72 // Map of UpdateListIdentifier to the V4Store. |
| 73 StoreMap store_map_; |
| 74 |
70 // The factory that controls the creation of V4Database objects. | 75 // The factory that controls the creation of V4Database objects. |
71 // This is used *only* by tests. | 76 // This is used *only* by tests. |
72 static V4DatabaseFactory* factory_; | 77 static V4DatabaseFactory* factory_; |
73 | 78 |
74 DISALLOW_COPY_AND_ASSIGN(V4Database); | 79 DISALLOW_COPY_AND_ASSIGN(V4Database); |
75 }; | 80 }; |
76 | 81 |
77 } // namespace safe_browsing | 82 } // namespace safe_browsing |
78 | 83 |
79 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_DATABASE_H_ | 84 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_DATABASE_H_ |
OLD | NEW |