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

Unified Diff: components/safe_browsing_db/v4_local_database_manager.cc

Issue 2377273004: Reland: Start checking URLs using PVer4. Verdict not returned to client yet. (Closed)
Patch Set: Remove #DEBUG -- it enables these features on Android :-( Created 4 years, 3 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
« no previous file with comments | « components/safe_browsing_db/v4_local_database_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/v4_local_database_manager.cc
diff --git a/components/safe_browsing_db/v4_local_database_manager.cc b/components/safe_browsing_db/v4_local_database_manager.cc
index 9215dc72288f63ac34bf874e4632b7d2ff907a8c..28320252fec77167878326768d915c7ef53f9ae8 100644
--- a/components/safe_browsing_db/v4_local_database_manager.cc
+++ b/components/safe_browsing_db/v4_local_database_manager.cc
@@ -12,6 +12,8 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/memory/ptr_util.h"
+#include "base/memory/ref_counted.h"
+#include "components/safe_browsing_db/v4_feature_list.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
@@ -64,6 +66,16 @@ V4LocalDatabaseManager::PendingCheck::PendingCheck(
V4LocalDatabaseManager::PendingCheck::~PendingCheck() {}
+// static
+scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create(
+ const base::FilePath& base_path) {
+ if (!V4FeatureList::IsLocalDatabaseManagerEnabled()) {
+ return nullptr;
+ }
+
+ return make_scoped_refptr(new V4LocalDatabaseManager(base_path));
+}
+
V4LocalDatabaseManager::V4LocalDatabaseManager(const base::FilePath& base_path)
: base_path_(base_path), enabled_(false), list_infos_(GetListInfos()) {
DCHECK(!base_path_.empty());
« no previous file with comments | « components/safe_browsing_db/v4_local_database_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698