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/download/download_danger_prompt.h" | 5 #include "chrome/browser/download/download_danger_prompt.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
11 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 12 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
12 #include "chrome/browser/download/download_stats.h" | 13 #include "chrome/browser/download/download_stats.h" |
13 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s
ampling.h" | 14 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s
ampling.h" |
14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 15 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
15 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 16 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
16 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 17 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
17 #include "chrome/common/safe_browsing/csd.pb.h" | 18 #include "chrome/common/safe_browsing/csd.pb.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 report.set_type(ClientSafeBrowsingReportRequest::MALICIOUS_DOWNLOAD_RECOVERY); | 286 report.set_type(ClientSafeBrowsingReportRequest::MALICIOUS_DOWNLOAD_RECOVERY); |
286 report.set_url(url.spec()); | 287 report.set_url(url.spec()); |
287 report.set_did_proceed(did_proceed); | 288 report.set_did_proceed(did_proceed); |
288 | 289 |
289 std::string serialized_report; | 290 std::string serialized_report; |
290 if (report.SerializeToString(&serialized_report)) | 291 if (report.SerializeToString(&serialized_report)) |
291 sb_service->SendDownloadRecoveryReport(serialized_report); | 292 sb_service->SendDownloadRecoveryReport(serialized_report); |
292 else | 293 else |
293 DLOG(ERROR) << "Unable to serialize the threat report."; | 294 DLOG(ERROR) << "Unable to serialize the threat report."; |
294 } | 295 } |
OLD | NEW |