Chromium Code Reviews| 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/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 factory_ = factory; | 157 factory_ = factory; |
| 158 } | 158 } |
| 159 | 159 |
| 160 // Factory method to create a V4Database. When the database creation is | 160 // Factory method to create a V4Database. When the database creation is |
| 161 // complete, it calls the NewDatabaseReadyCallback on |callback_task_runner|. | 161 // complete, it calls the NewDatabaseReadyCallback on |callback_task_runner|. |
| 162 static void CreateOnTaskRunner( | 162 static void CreateOnTaskRunner( |
| 163 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner, | 163 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner, |
| 164 const base::FilePath& base_path, | 164 const base::FilePath& base_path, |
| 165 const ListInfos& list_infos, | 165 const ListInfos& list_infos, |
| 166 const scoped_refptr<base::SingleThreadTaskRunner>& callback_task_runner, | 166 const scoped_refptr<base::SingleThreadTaskRunner>& callback_task_runner, |
| 167 NewDatabaseReadyCallback callback); | 167 NewDatabaseReadyCallback callback, |
| 168 const base::TimeTicks before); | |
|
Nathan Parker
2016/10/21 20:21:19
How about "create_start_time?" "before" is nonobvi
vakh (use Gerrit instead)
2016/10/21 22:54:04
Done.
| |
| 168 | 169 |
| 169 // Callback called when a new store has been created and is ready to be used. | 170 // Callback called when a new store has been created and is ready to be used. |
| 170 // This method updates the store_map_ to point to the new store, which causes | 171 // This method updates the store_map_ to point to the new store, which causes |
| 171 // the old store to get deleted. | 172 // the old store to get deleted. |
| 172 void UpdatedStoreReady(ListIdentifier identifier, | 173 void UpdatedStoreReady(ListIdentifier identifier, |
| 173 std::unique_ptr<V4Store> store); | 174 std::unique_ptr<V4Store> store); |
| 174 | 175 |
| 175 // See |VerifyChecksum|. | 176 // See |VerifyChecksum|. |
| 176 void VerifyChecksumOnTaskRunner( | 177 void VerifyChecksumOnTaskRunner( |
| 177 const scoped_refptr<base::SingleThreadTaskRunner>& callback_task_runner, | 178 const scoped_refptr<base::SingleThreadTaskRunner>& callback_task_runner, |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 192 // that needed updating and is ready for the next update. It should only be | 193 // that needed updating and is ready for the next update. It should only be |
| 193 // accessed on the IO thread. | 194 // accessed on the IO thread. |
| 194 int pending_store_updates_; | 195 int pending_store_updates_; |
| 195 | 196 |
| 196 DISALLOW_COPY_AND_ASSIGN(V4Database); | 197 DISALLOW_COPY_AND_ASSIGN(V4Database); |
| 197 }; | 198 }; |
| 198 | 199 |
| 199 } // namespace safe_browsing | 200 } // namespace safe_browsing |
| 200 | 201 |
| 201 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_DATABASE_H_ | 202 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_DATABASE_H_ |
| OLD | NEW |