Index: chrome/browser/safe_browsing/safe_browsing_service.cc |
=================================================================== |
--- chrome/browser/safe_browsing/safe_browsing_service.cc (revision 65873) |
+++ chrome/browser/safe_browsing/safe_browsing_service.cc (working copy) |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/metrics/metrics_service.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profile_manager.h" |
+#include "chrome/browser/safe_browsing/malware_report.h" |
#include "chrome/browser/safe_browsing/protocol_manager.h" |
#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
#include "chrome/browser/safe_browsing/safe_browsing_database.h" |
@@ -832,3 +833,14 @@ |
referrer_url, is_subresource, |
threat_type); |
} |
+ |
+// Called after the user has opted in to send the malware |report|. |
+void SafeBrowsingService::SendMalwareReport( |
+ scoped_refptr<SafeBrowsingMalwareReport> report) { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
+ scoped_ptr<const std::string> serialized(report->GetSerializedReport()); |
+ if (!serialized->empty()) { |
+ DVLOG(1) << "Sending serialized report."; |
+ protocol_manager_->SendMalwareReport(serialized.get()); |
+ } |
+} |