| 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/android/download/download_controller.h" | 5 #include "chrome/browser/android/download/download_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "content/public/browser/render_process_host.h" | 25 #include "content/public/browser/render_process_host.h" |
| 26 #include "content/public/browser/render_view_host.h" | 26 #include "content/public/browser/render_view_host.h" |
| 27 #include "content/public/common/referrer.h" | 27 #include "content/public/common/referrer.h" |
| 28 #include "jni/DownloadController_jni.h" | 28 #include "jni/DownloadController_jni.h" |
| 29 #include "net/base/filename_util.h" | 29 #include "net/base/filename_util.h" |
| 30 #include "ui/android/view_android.h" | 30 #include "ui/android/view_android.h" |
| 31 #include "ui/android/window_android.h" | 31 #include "ui/android/window_android.h" |
| 32 #include "ui/base/page_transition_types.h" | 32 #include "ui/base/page_transition_types.h" |
| 33 | 33 |
| 34 using base::android::ConvertUTF8ToJavaString; | 34 using base::android::ConvertUTF8ToJavaString; |
| 35 using base::android::JavaParamRef; |
| 35 using base::android::ScopedJavaLocalRef; | 36 using base::android::ScopedJavaLocalRef; |
| 36 using content::BrowserContext; | 37 using content::BrowserContext; |
| 37 using content::BrowserThread; | 38 using content::BrowserThread; |
| 38 using content::ContextMenuParams; | 39 using content::ContextMenuParams; |
| 39 using content::DownloadItem; | 40 using content::DownloadItem; |
| 40 using content::DownloadManager; | 41 using content::DownloadManager; |
| 41 using content::WebContents; | 42 using content::WebContents; |
| 42 | 43 |
| 43 namespace { | 44 namespace { |
| 44 // Guards download_controller_ | 45 // Guards download_controller_ |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 if (!item) | 432 if (!item) |
| 432 return; | 433 return; |
| 433 if (accept) { | 434 if (accept) { |
| 434 item->ValidateDangerousDownload(); | 435 item->ValidateDangerousDownload(); |
| 435 } else { | 436 } else { |
| 436 DownloadController::RecordDownloadCancelReason( | 437 DownloadController::RecordDownloadCancelReason( |
| 437 DownloadController::CANCEL_REASON_DANGEROUS_DOWNLOAD_INFOBAR_DISMISSED); | 438 DownloadController::CANCEL_REASON_DANGEROUS_DOWNLOAD_INFOBAR_DISMISSED); |
| 438 item->Remove(); | 439 item->Remove(); |
| 439 } | 440 } |
| 440 } | 441 } |
| OLD | NEW |