| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 state_callback_list_.Notify(); | 656 state_callback_list_.Notify(); |
| 657 | 657 |
| 658 #if defined(FULL_SAFE_BROWSING) | 658 #if defined(FULL_SAFE_BROWSING) |
| 659 if (csd_service_) | 659 if (csd_service_) |
| 660 csd_service_->SetEnabledAndRefreshState(enable); | 660 csd_service_->SetEnabledAndRefreshState(enable); |
| 661 if (download_service_) | 661 if (download_service_) |
| 662 download_service_->SetEnabled(enable); | 662 download_service_->SetEnabled(enable); |
| 663 #endif | 663 #endif |
| 664 } | 664 } |
| 665 | 665 |
| 666 void SafeBrowsingService::SendDownloadRecoveryReport( | 666 void SafeBrowsingService::SendSerializedDownloadReport( |
| 667 const std::string& report) { | 667 const std::string& report) { |
| 668 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 668 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 669 BrowserThread::PostTask( | 669 BrowserThread::PostTask( |
| 670 BrowserThread::IO, FROM_HERE, | 670 BrowserThread::IO, FROM_HERE, |
| 671 base::Bind(&SafeBrowsingService::OnSendDownloadRecoveryReport, this, | 671 base::Bind(&SafeBrowsingService::OnSendSerializedDownloadReport, this, |
| 672 report)); | 672 report)); |
| 673 } | 673 } |
| 674 | 674 |
| 675 void SafeBrowsingService::OnSendDownloadRecoveryReport( | 675 void SafeBrowsingService::OnSendSerializedDownloadReport( |
| 676 const std::string& report) { | 676 const std::string& report) { |
| 677 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 677 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 678 if (ping_manager()) | 678 if (ping_manager()) |
| 679 ping_manager()->ReportThreatDetails(report); | 679 ping_manager()->ReportThreatDetails(report); |
| 680 } | 680 } |
| 681 | 681 |
| 682 } // namespace safe_browsing | 682 } // namespace safe_browsing |
| OLD | NEW |