| Index: chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
|
| index 7921771a81372d8c25470dd2dacad21928ac22b3..26e1691391d3170f225c49b2c6807f423cf88e02 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
|
| @@ -56,15 +56,16 @@ public class ChromeDownloadDelegate implements ContentViewDownloadDelegate {
|
|
|
| private class DangerousDownloadListener implements SimpleConfirmInfoBarBuilder.Listener {
|
| @Override
|
| - public void onInfoBarButtonClicked(boolean confirm) {
|
| + public boolean onInfoBarButtonClicked(boolean confirm) {
|
| assert mTab != null;
|
| - if (mPendingRequest == null) return;
|
| + if (mPendingRequest == null) return false;
|
| if (mPendingRequest.getDownloadGuid() != null) {
|
| nativeDangerousDownloadValidated(mTab, mPendingRequest.getDownloadGuid(), confirm);
|
| if (confirm) {
|
| showDownloadStartNotification();
|
| }
|
| - closeBlankTab();
|
| + mPendingRequest = null;
|
| + return closeBlankTab();
|
| } else if (confirm) {
|
| // User confirmed the download.
|
| if (mPendingRequest.isGETRequest()) {
|
| @@ -96,13 +97,16 @@ public class ChromeDownloadDelegate implements ContentViewDownloadDelegate {
|
| DownloadManagerService.getDownloadManagerService(mContext).onDownloadCompleted(
|
| newDownloadInfo);
|
| }
|
| + mPendingRequest = null;
|
| + return false;
|
| } else {
|
| // User did not accept the download, discard the file if it is a POST download.
|
| if (!mPendingRequest.isGETRequest()) {
|
| discardFile(mPendingRequest.getFilePath());
|
| }
|
| + mPendingRequest = null;
|
| + return closeBlankTab();
|
| }
|
| - mPendingRequest = null;
|
| }
|
|
|
| @Override
|
|
|