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

Side by Side 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: shess@'s review Created 4 years, 2 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/services_delegate_impl.h" 5 #include "chrome/browser/safe_browsing/services_delegate_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 net::URLRequestContextGetter* context_getter) { 57 net::URLRequestContextGetter* context_getter) {
58 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 58 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
59 #if defined(SAFE_BROWSING_CSD) 59 #if defined(SAFE_BROWSING_CSD)
60 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 60 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
61 switches::kDisableClientSidePhishingDetection)) { 61 switches::kDisableClientSidePhishingDetection)) {
62 csd_service_.reset(ClientSideDetectionService::Create(context_getter)); 62 csd_service_.reset(ClientSideDetectionService::Create(context_getter));
63 } 63 }
64 #endif // defined(SAFE_BROWSING_CSD) 64 #endif // defined(SAFE_BROWSING_CSD)
65 } 65 }
66 66
67 const scoped_refptr<V4LocalDatabaseManager>&
68 ServicesDelegateImpl::v4_local_database_manager() const {
69 return v4_local_database_manager_;
70 }
71
67 void ServicesDelegateImpl::Initialize() { 72 void ServicesDelegateImpl::Initialize() {
68 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 73 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
69 download_service_.reset( 74 download_service_.reset(
70 (services_creator_ && 75 (services_creator_ &&
71 services_creator_->CanCreateDownloadProtectionService()) 76 services_creator_->CanCreateDownloadProtectionService())
72 ? services_creator_->CreateDownloadProtectionService() 77 ? services_creator_->CreateDownloadProtectionService()
73 : CreateDownloadProtectionService()); 78 : CreateDownloadProtectionService());
74 incident_service_.reset( 79 incident_service_.reset(
75 (services_creator_ && 80 (services_creator_ &&
76 services_creator_->CanCreateIncidentReportingService()) 81 services_creator_->CanCreateIncidentReportingService())
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 187 }
183 188
184 V4LocalDatabaseManager* ServicesDelegateImpl::CreateV4LocalDatabaseManager() { 189 V4LocalDatabaseManager* ServicesDelegateImpl::CreateV4LocalDatabaseManager() {
185 return new V4LocalDatabaseManager(SafeBrowsingService::GetBaseFilename()); 190 return new V4LocalDatabaseManager(SafeBrowsingService::GetBaseFilename());
186 } 191 }
187 192
188 bool ServicesDelegateImpl::IsV4LocalDatabaseManagerEnabled() { 193 bool ServicesDelegateImpl::IsV4LocalDatabaseManagerEnabled() {
189 #ifndef NDEBUG 194 #ifndef NDEBUG
190 return true; 195 return true;
191 #else 196 #else
192 return base::FeatureList::IsEnabled( 197 return base::FeatureList::IsEnabled(
Nathan Parker 2016/09/28 17:24:14 Double checking the expected outcome here: All deb
vakh (use Gerrit instead) 2016/09/28 22:13:35 Good catch. Changed.
193 kSafeBrowsingV4LocalDatabaseManagerEnabled); 198 kSafeBrowsingV4LocalDatabaseManagerEnabled);
194 #endif 199 #endif
195 } 200 }
196 201
197 } // namespace safe_browsing 202 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698