| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 url_request_context_getter_ = new SafeBrowsingURLRequestContextGetter( | 318 url_request_context_getter_ = new SafeBrowsingURLRequestContextGetter( |
| 319 g_browser_process->system_request_context()); | 319 g_browser_process->system_request_context()); |
| 320 | 320 |
| 321 ui_manager_ = CreateUIManager(); | 321 ui_manager_ = CreateUIManager(); |
| 322 | 322 |
| 323 if (!use_v4_only_) { | 323 if (!use_v4_only_) { |
| 324 database_manager_ = CreateDatabaseManager(); | 324 database_manager_ = CreateDatabaseManager(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 if (base::FeatureList::IsEnabled( | 327 navigation_observer_manager_ = new SafeBrowsingNavigationObserverManager(); |
| 328 SafeBrowsingNavigationObserverManager::kDownloadAttribution)) { | |
| 329 navigation_observer_manager_ = new SafeBrowsingNavigationObserverManager(); | |
| 330 } | |
| 331 | 328 |
| 332 services_delegate_->Initialize(v4_enabled_); | 329 services_delegate_->Initialize(v4_enabled_); |
| 333 services_delegate_->InitializeCsdService(url_request_context_getter_.get()); | 330 services_delegate_->InitializeCsdService(url_request_context_getter_.get()); |
| 334 | 331 |
| 335 // Track profile creation and destruction. | 332 // Track profile creation and destruction. |
| 336 profiles_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CREATED, | 333 profiles_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CREATED, |
| 337 content::NotificationService::AllSources()); | 334 content::NotificationService::AllSources()); |
| 338 profiles_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, | 335 profiles_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, |
| 339 content::NotificationService::AllSources()); | 336 content::NotificationService::AllSources()); |
| 340 | 337 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 | 770 |
| 774 void SafeBrowsingService::RemovePasswordProtectionService(Profile* profile) { | 771 void SafeBrowsingService::RemovePasswordProtectionService(Profile* profile) { |
| 775 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 772 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 776 DCHECK(profile); | 773 DCHECK(profile); |
| 777 auto it = password_protection_service_map_.find(profile); | 774 auto it = password_protection_service_map_.find(profile); |
| 778 if (it != password_protection_service_map_.end()) | 775 if (it != password_protection_service_map_.end()) |
| 779 password_protection_service_map_.erase(it); | 776 password_protection_service_map_.erase(it); |
| 780 } | 777 } |
| 781 | 778 |
| 782 } // namespace safe_browsing | 779 } // namespace safe_browsing |
| OLD | NEW |