Chromium Code Reviews| Index: chrome/browser/safe_browsing/safe_browsing_service.cc |
| =================================================================== |
| --- chrome/browser/safe_browsing/safe_browsing_service.cc (revision 106177) |
| +++ chrome/browser/safe_browsing/safe_browsing_service.cc (working copy) |
| @@ -175,12 +175,9 @@ |
| safe_browsing::ClientSideDetectionService::Create( |
| g_browser_process->system_request_context())); |
| } |
| - if (CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kEnableImprovedDownloadProtection)) { |
| - download_service_ = new safe_browsing::DownloadProtectionService( |
| - this, |
| - g_browser_process->system_request_context()); |
| - } |
| + download_service_ = new safe_browsing::DownloadProtectionService( |
| + AsWeakPtr(), |
| + g_browser_process->system_request_context()); |
| #endif |
| } |
| @@ -1368,6 +1365,9 @@ |
| if (csd_service_.get()) |
| csd_service_->SetEnabled(enable); |
| - if (download_service_.get()) |
| - download_service_->SetEnabled(enable); |
| + if (download_service_.get()) { |
| + download_service_->SetEnabled( |
| + enable && CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableImprovedDownloadProtection)); |
|
mattm
2011/10/19 18:54:12
So this isn't aiming to get histograms from users
Brian Ryner
2011/10/19 19:20:11
It will, because we only check the "enabled" state
|
| + } |
| } |