OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "components/safe_browsing_db/v4_database.h" | |
6 | |
7 namespace safe_browsing { | |
8 | |
9 V4Database* V4DatabaseFactory::CreateV4Database( | |
10 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner, | |
11 const base::FilePath& base_path, | |
12 ListInfoMap list_suffix_map) { | |
vakh (use Gerrit instead)
2016/05/06 00:41:36
This should be list_info_map -- I have fixed it in
| |
13 StoreMap store_map; | |
14 | |
15 // TODO(vakh): Populate the store_map using list_suffix_map. | |
16 | |
17 return new V4Database(db_task_runner, std::move(store_map)); | |
18 } | |
19 | |
20 // static | |
21 // Factory method, should be called on the Safe Browsing sequenced task runner, | |
22 // which is also passed to the function as |db_task_runner|. | |
23 V4Database* V4Database::Create( | |
24 V4DatabaseFactory* factory, | |
25 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner, | |
26 const base::FilePath& base_path, | |
27 ListInfoMap list_info_map) { | |
28 DCHECK(factory); | |
29 DCHECK(db_task_runner->RunsTasksOnCurrentThread()); | |
30 if (factory) { | |
31 return factory->CreateV4Database(db_task_runner, base_path, | |
32 list_info_map); | |
33 } else { | |
34 return nullptr; | |
35 } | |
36 } | |
37 | |
38 V4Database::V4Database( | |
39 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner, | |
40 StoreMap store_map) { | |
41 // TODO(vakh): Implement skeleton | |
42 } | |
43 | |
44 V4Database::~V4Database() {} | |
45 | |
46 bool V4Database::ResetDatabase() { | |
47 // TODO(vakh): Delete the stores. Delete the backing files. | |
48 return true; | |
49 } | |
50 | |
51 } // namespace safe_browsing | |
OLD | NEW |