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

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

Issue 836963003: Add the result of the inclusion whitelist to the OffDomainInclusionDetector's analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@#c1_sbDB_ODIsupport
Patch Set: fix test leak Created 5 years, 11 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 download_service_.reset(new safe_browsing::DownloadProtectionService( 227 download_service_.reset(new safe_browsing::DownloadProtectionService(
228 this, url_request_context_getter_.get())); 228 this, url_request_context_getter_.get()));
229 #endif 229 #endif
230 230
231 if (IsIncidentReportingServiceEnabled()) { 231 if (IsIncidentReportingServiceEnabled()) {
232 incident_service_.reset(new safe_browsing::IncidentReportingService( 232 incident_service_.reset(new safe_browsing::IncidentReportingService(
233 this, url_request_context_getter_)); 233 this, url_request_context_getter_));
234 } 234 }
235 235
236 off_domain_inclusion_detector_.reset( 236 off_domain_inclusion_detector_.reset(
237 new safe_browsing::OffDomainInclusionDetector); 237 new safe_browsing::OffDomainInclusionDetector(database_manager_));
238 #endif 238 #endif
239 239
240 // Track the safe browsing preference of existing profiles. 240 // Track the safe browsing preference of existing profiles.
241 // The SafeBrowsingService will be started if any existing profile has the 241 // The SafeBrowsingService will be started if any existing profile has the
242 // preference enabled. It will also listen for updates to the preferences. 242 // preference enabled. It will also listen for updates to the preferences.
243 ProfileManager* profile_manager = g_browser_process->profile_manager(); 243 ProfileManager* profile_manager = g_browser_process->profile_manager();
244 if (profile_manager) { 244 if (profile_manager) {
245 std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles(); 245 std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles();
246 for (size_t i = 0; i < profiles.size(); ++i) { 246 for (size_t i = 0; i < profiles.size(); ++i) {
247 if (profiles[i]->IsOffTheRecord()) 247 if (profiles[i]->IsOffTheRecord())
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 else 577 else
578 Stop(false); 578 Stop(false);
579 579
580 #if defined(FULL_SAFE_BROWSING) 580 #if defined(FULL_SAFE_BROWSING)
581 if (csd_service_) 581 if (csd_service_)
582 csd_service_->SetEnabledAndRefreshState(enable); 582 csd_service_->SetEnabledAndRefreshState(enable);
583 if (download_service_) 583 if (download_service_)
584 download_service_->SetEnabled(enable); 584 download_service_->SetEnabled(enable);
585 #endif 585 #endif
586 } 586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698