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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 1402783005: Remove safe_browsing=2 functionality, replace with =3 mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix up histograms Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/safe_browsing_service.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 #if defined(FULL_SAFE_BROWSING) 245 #if defined(FULL_SAFE_BROWSING)
246 #if defined(SAFE_BROWSING_CSD) 246 #if defined(SAFE_BROWSING_CSD)
247 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 247 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
248 switches::kDisableClientSidePhishingDetection)) { 248 switches::kDisableClientSidePhishingDetection)) {
249 csd_service_.reset(safe_browsing::ClientSideDetectionService::Create( 249 csd_service_.reset(safe_browsing::ClientSideDetectionService::Create(
250 url_request_context_getter_.get())); 250 url_request_context_getter_.get()));
251 } 251 }
252 #endif // defined(SAFE_BROWSING_CSD) 252 #endif // defined(SAFE_BROWSING_CSD)
253 253
254 // TODO(nparker): Adding SAFE_BROWSING_SERVICE_DOWNLOAD to control this might
255 // allow removing FULL_SAFE_BROWSING above.
256 #if !defined(OS_ANDROID)
257 download_service_.reset(new safe_browsing::DownloadProtectionService( 254 download_service_.reset(new safe_browsing::DownloadProtectionService(
258 this, url_request_context_getter_.get())); 255 this, url_request_context_getter_.get()));
259 #endif
260 256
261 if (safe_browsing::IncidentReportingService::IsEnabled()) { 257 if (safe_browsing::IncidentReportingService::IsEnabled()) {
262 incident_service_.reset(new safe_browsing::IncidentReportingService( 258 incident_service_.reset(new safe_browsing::IncidentReportingService(
263 this, url_request_context_getter_)); 259 this, url_request_context_getter_));
264 resource_request_detector_.reset(new safe_browsing::ResourceRequestDetector( 260 resource_request_detector_.reset(new safe_browsing::ResourceRequestDetector(
265 incident_service_->GetIncidentReceiver())); 261 incident_service_->GetIncidentReceiver()));
266 } 262 }
267 263
268 off_domain_inclusion_detector_.reset( 264 off_domain_inclusion_detector_.reset(
269 new safe_browsing::OffDomainInclusionDetector(database_manager_)); 265 new safe_browsing::OffDomainInclusionDetector(database_manager_));
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 656
661 state_callback_list_.Notify(); 657 state_callback_list_.Notify();
662 658
663 #if defined(FULL_SAFE_BROWSING) 659 #if defined(FULL_SAFE_BROWSING)
664 if (csd_service_) 660 if (csd_service_)
665 csd_service_->SetEnabledAndRefreshState(enable); 661 csd_service_->SetEnabledAndRefreshState(enable);
666 if (download_service_) 662 if (download_service_)
667 download_service_->SetEnabled(enable); 663 download_service_->SetEnabled(enable);
668 #endif 664 #endif
669 } 665 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698