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

Unified Diff: chrome/browser/safe_browsing/services_delegate_impl.cc

Issue 2371043003: Small: Start checking URLs using PVer4. Verdict not returned to client yet. (Closed)
Patch Set: Remove NOTREACHED 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
Index: chrome/browser/safe_browsing/services_delegate_impl.cc
diff --git a/chrome/browser/safe_browsing/services_delegate_impl.cc b/chrome/browser/safe_browsing/services_delegate_impl.cc
index cb72d0e9c2e21db59e7644e3f7512139943c3a27..2097437e71f065d5f3f435832d8345ec6f3c49f5 100644
--- a/chrome/browser/safe_browsing/services_delegate_impl.cc
+++ b/chrome/browser/safe_browsing/services_delegate_impl.cc
@@ -8,7 +8,6 @@
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
-#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/chrome_switches.h"
@@ -17,15 +16,6 @@
namespace safe_browsing {
-#ifdef NDEBUG
-namespace {
-const base::Feature kSafeBrowsingV4LocalDatabaseManagerEnabled {
- "SafeBrowsingV4LocalDatabaseManagerEnabled",
- base::FEATURE_DISABLED_BY_DEFAULT
-};
-} // namespace
-#endif
-
// static
std::unique_ptr<ServicesDelegate> ServicesDelegate::Create(
SafeBrowsingService* safe_browsing_service) {
@@ -64,6 +54,11 @@ void ServicesDelegateImpl::InitializeCsdService(
#endif // defined(SAFE_BROWSING_CSD)
}
+const scoped_refptr<V4LocalDatabaseManager>&
+ServicesDelegateImpl::v4_local_database_manager() const {
+ return v4_local_database_manager_;
+}
+
void ServicesDelegateImpl::Initialize() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
download_service_.reset(
@@ -82,9 +77,8 @@ void ServicesDelegateImpl::Initialize() {
? services_creator_->CreateResourceRequestDetector()
: CreateResourceRequestDetector());
- if (IsV4LocalDatabaseManagerEnabled()) {
- v4_local_database_manager_ = CreateV4LocalDatabaseManager();
- }
+ v4_local_database_manager_ =
+ V4LocalDatabaseManager::Create(SafeBrowsingService::GetBaseFilename());
}
void ServicesDelegateImpl::ShutdownServices() {
@@ -181,17 +175,4 @@ void ServicesDelegateImpl::StopOnIOThread(bool shutdown) {
}
}
-V4LocalDatabaseManager* ServicesDelegateImpl::CreateV4LocalDatabaseManager() {
- return new V4LocalDatabaseManager(SafeBrowsingService::GetBaseFilename());
-}
-
-bool ServicesDelegateImpl::IsV4LocalDatabaseManagerEnabled() {
-#ifndef NDEBUG
- return true;
-#else
- return base::FeatureList::IsEnabled(
- kSafeBrowsingV4LocalDatabaseManagerEnabled);
-#endif
-}
-
} // namespace safe_browsing
« no previous file with comments | « chrome/browser/safe_browsing/services_delegate_impl.h ('k') | chrome/browser/safe_browsing/services_delegate_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698