| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/download/download_stats.h" | 9 #include "chrome/browser/download/download_stats.h" |
| 10 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s
ampling.h" | 10 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s
ampling.h" |
| 11 #include "chrome/browser/safe_browsing/download_protection_service.h" | 11 #include "chrome/browser/safe_browsing/download_protection_service.h" |
| 12 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 12 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 13 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 13 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
| 14 #include "chrome/grit/chromium_strings.h" | 14 #include "chrome/grit/chromium_strings.h" |
| 15 #include "chrome/grit/generated_resources.h" | 15 #include "chrome/grit/generated_resources.h" |
| 16 #include "components/strings/grit/components_strings.h" |
| 16 #include "content/public/browser/browser_context.h" | 17 #include "content/public/browser/browser_context.h" |
| 17 #include "content/public/browser/download_danger_type.h" | 18 #include "content/public/browser/download_danger_type.h" |
| 18 #include "content/public/browser/download_item.h" | 19 #include "content/public/browser/download_item.h" |
| 19 #include "grit/components_strings.h" | |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 | 22 |
| 23 using extensions::ExperienceSamplingEvent; | 23 using extensions::ExperienceSamplingEvent; |
| 24 using safe_browsing::ClientSafeBrowsingReportRequest; | 24 using safe_browsing::ClientSafeBrowsingReportRequest; |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // TODO(wittman): Create a native web contents modal dialog implementation of | 28 // TODO(wittman): Create a native web contents modal dialog implementation of |
| 29 // this dialog for non-Views platforms, to support bold formatting of the | 29 // this dialog for non-Views platforms, to support bold formatting of the |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 content::DownloadItem* item, | 276 content::DownloadItem* item, |
| 277 content::WebContents* web_contents, | 277 content::WebContents* web_contents, |
| 278 bool show_context, | 278 bool show_context, |
| 279 const OnDone& done) { | 279 const OnDone& done) { |
| 280 DownloadDangerPromptImpl* prompt = | 280 DownloadDangerPromptImpl* prompt = |
| 281 new DownloadDangerPromptImpl(item, web_contents, show_context, done); | 281 new DownloadDangerPromptImpl(item, web_contents, show_context, done); |
| 282 // |prompt| will be deleted when the dialog is done. | 282 // |prompt| will be deleted when the dialog is done. |
| 283 TabModalConfirmDialog::Create(prompt, web_contents); | 283 TabModalConfirmDialog::Create(prompt, web_contents); |
| 284 return prompt; | 284 return prompt; |
| 285 } | 285 } |
| OLD | NEW |