Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Side by Side Diff: components/safe_browsing_db/v4_database.cc

Issue 1952843003: Skeleton of the overall design for the database for Pver4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add space in comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 // static
10 V4DatabaseFactory* V4Database::factory_ = NULL;
11
12 // static
13 // Factory method, should be called on the Safe Browsing sequenced task runner,
14 // which is also passed to the function as |db_task_runner|.
15 V4Database* V4Database::Create(
16 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner,
17 const base::FilePath& base_path,
18 ListInfoMap list_info_map) {
19 DCHECK(db_task_runner->RunsTasksOnCurrentThread());
20 if (!factory_) {
21 StoreMap store_map;
22 // TODO(vakh): Populate the store_map using list_suffix_map.
23 return new V4Database(db_task_runner, std::move(store_map));
24 } else {
25 return factory_->CreateV4Database(db_task_runner, base_path, list_info_map);
26 }
27 }
28
29 V4Database::V4Database(
30 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner,
31 StoreMap store_map) {
32 // TODO(vakh): Implement skeleton
33 }
34
35 V4Database::~V4Database() {}
36
37 bool V4Database::ResetDatabase() {
38 // TODO(vakh): Delete the stores. Delete the backing files.
39 return true;
40 }
41
42 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_database.h ('k') | components/safe_browsing_db/v4_local_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698