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 2687023007: Revert of Browser tests for using the new SafeBrowsing protocol (v4) (Closed)
Patch Set: Created 3 years, 10 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 ExtendedReportingLevel 57 ExtendedReportingLevel
58 ServicesDelegateImpl::GetEstimatedExtendedReportingLevel() const { 58 ServicesDelegateImpl::GetEstimatedExtendedReportingLevel() const {
59 return safe_browsing_service_->estimated_extended_reporting_by_prefs(); 59 return safe_browsing_service_->estimated_extended_reporting_by_prefs();
60 } 60 }
61 61
62 const scoped_refptr<SafeBrowsingDatabaseManager>& 62 const scoped_refptr<SafeBrowsingDatabaseManager>&
63 ServicesDelegateImpl::v4_local_database_manager() const { 63 ServicesDelegateImpl::v4_local_database_manager() const {
64 return v4_local_database_manager_; 64 return v4_local_database_manager_;
65 } 65 }
66 66
67 void ServicesDelegateImpl::Initialize(bool v4_enabled) { 67 void ServicesDelegateImpl::Initialize() {
68 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 68 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
69 69
70 if (v4_enabled) { 70 v4_local_database_manager_ = V4LocalDatabaseManager::Create(
71 v4_local_database_manager_ = V4LocalDatabaseManager::Create( 71 SafeBrowsingService::GetBaseFilename(),
72 SafeBrowsingService::GetBaseFilename(), 72 base::Bind(&ServicesDelegateImpl::GetEstimatedExtendedReportingLevel,
73 base::Bind(&ServicesDelegateImpl::GetEstimatedExtendedReportingLevel, 73 base::Unretained(this)));
74 base::Unretained(this)));
75 }
76 74
77 download_service_.reset( 75 download_service_.reset(
78 (services_creator_ && 76 (services_creator_ &&
79 services_creator_->CanCreateDownloadProtectionService()) 77 services_creator_->CanCreateDownloadProtectionService())
80 ? services_creator_->CreateDownloadProtectionService() 78 ? services_creator_->CreateDownloadProtectionService()
81 : CreateDownloadProtectionService()); 79 : CreateDownloadProtectionService());
82 incident_service_.reset( 80 incident_service_.reset(
83 (services_creator_ && 81 (services_creator_ &&
84 services_creator_->CanCreateIncidentReportingService()) 82 services_creator_->CanCreateIncidentReportingService())
85 ? services_creator_->CreateIncidentReportingService() 83 ? services_creator_->CreateIncidentReportingService()
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 177 }
180 } 178 }
181 179
182 void ServicesDelegateImpl::StopOnIOThread(bool shutdown) { 180 void ServicesDelegateImpl::StopOnIOThread(bool shutdown) {
183 if (v4_local_database_manager_.get()) { 181 if (v4_local_database_manager_.get()) {
184 v4_local_database_manager_->StopOnIOThread(shutdown); 182 v4_local_database_manager_->StopOnIOThread(shutdown);
185 } 183 }
186 } 184 }
187 185
188 } // namespace safe_browsing 186 } // namespace safe_browsing
OLDNEW
« 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