| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/threading/thread.h" |
| 13 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
| 14 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/metrics/metrics_service.h" | 16 #include "chrome/browser/metrics/metrics_service.h" |
| 16 #include "chrome/browser/prefs/pref_change_registrar.h" | 17 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 17 #include "chrome/browser/prefs/pref_service.h" | 18 #include "chrome/browser/prefs/pref_service.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profile_manager.h" |
| 20 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 21 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
| 21 #include "chrome/browser/safe_browsing/download_protection_service.h" | 22 #include "chrome/browser/safe_browsing/download_protection_service.h" |
| 22 #include "chrome/browser/safe_browsing/malware_details.h" | 23 #include "chrome/browser/safe_browsing/malware_details.h" |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 Stop(); | 1362 Stop(); |
| 1362 | 1363 |
| 1363 if (csd_service_.get()) | 1364 if (csd_service_.get()) |
| 1364 csd_service_->SetEnabledAndRefreshState(enable); | 1365 csd_service_->SetEnabledAndRefreshState(enable); |
| 1365 if (download_service_.get()) { | 1366 if (download_service_.get()) { |
| 1366 download_service_->SetEnabled( | 1367 download_service_->SetEnabled( |
| 1367 enable && CommandLine::ForCurrentProcess()->HasSwitch( | 1368 enable && CommandLine::ForCurrentProcess()->HasSwitch( |
| 1368 switches::kEnableImprovedDownloadProtection)); | 1369 switches::kEnableImprovedDownloadProtection)); |
| 1369 } | 1370 } |
| 1370 } | 1371 } |
| OLD | NEW |