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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: components/safe_browsing_db/v4_database.cc
diff --git a/components/safe_browsing_db/v4_database.cc b/components/safe_browsing_db/v4_database.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f451a4f6084f4c0e3df331ba2c2d3783e7be9cd7
--- /dev/null
+++ b/components/safe_browsing_db/v4_database.cc
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/safe_browsing_db/v4_database.h"
+
+namespace safe_browsing {
+
+// static
+// Factory method, should be called on the Safe Browsing sequenced task runner,
+// which is also passed to the function as |db_task_runner|.
+V4Database* V4Database::Create(
+ V4DatabaseFactory* factory,
+ const scoped_refptr<base::SequencedTaskRunner>& db_task_runner,
+ bool enable_malware_list,
+ bool enable_phishing_list,
+ bool enable_unwanted_software_list) {
+ DCHECK(factory);
+ DCHECK(db_task_runner->RunsTasksOnCurrentThread());
+ if (factory) {
+ return factory->CreateV4Database(
+ db_task_runner,
+ enable_malware_list,
+ enable_phishing_list,
+ enable_unwanted_software_list);
+ } else {
+ return nullptr;
+ }
+}
+
+V4Database::~V4Database() {}
+
+} // namespace safe_browsing

Powered by Google App Engine
This is Rietveld 408576698