| 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 <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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 state_callback_list_.Notify(); | 638 state_callback_list_.Notify(); |
| 639 | 639 |
| 640 #if defined(FULL_SAFE_BROWSING) | 640 #if defined(FULL_SAFE_BROWSING) |
| 641 if (csd_service_) | 641 if (csd_service_) |
| 642 csd_service_->SetEnabledAndRefreshState(enable); | 642 csd_service_->SetEnabledAndRefreshState(enable); |
| 643 if (download_service_) | 643 if (download_service_) |
| 644 download_service_->SetEnabled(enable); | 644 download_service_->SetEnabled(enable); |
| 645 #endif | 645 #endif |
| 646 } | 646 } |
| 647 | 647 |
| 648 void SafeBrowsingService::SendDownloadRecoveryReport( |
| 649 const std::string& report) { |
| 650 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 651 BrowserThread::PostTask( |
| 652 BrowserThread::IO, FROM_HERE, |
| 653 base::Bind(&SafeBrowsingService::OnSendDownloadRecoveryReport, this, |
| 654 report)); |
| 655 } |
| 656 |
| 657 void SafeBrowsingService::OnSendDownloadRecoveryReport( |
| 658 const std::string& report) { |
| 659 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 660 if (ping_manager()) |
| 661 ping_manager()->ReportThreatDetails(report); |
| 662 } |
| 663 |
| 648 } // namespace safe_browsing | 664 } // namespace safe_browsing |
| OLD | NEW |