| Index: content/browser/download/download_resource_handler.cc
|
| diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
|
| index a0acc44e3ba78627e536e8aec1d0d887d43fdae1..5dadcaa5e60ffe7f0eaba41721cbbe9593242ed9 100644
|
| --- a/content/browser/download/download_resource_handler.cc
|
| +++ b/content/browser/download/download_resource_handler.cc
|
| @@ -196,8 +196,13 @@ void DownloadResourceHandler::OnStart(
|
| const DownloadUrlParameters::OnStartedCallback& callback) {
|
| // If the user cancels the download, then don't call start. Instead ignore the
|
| // download entirely.
|
| - if (create_info->result == DOWNLOAD_INTERRUPT_REASON_USER_CANCELED &&
|
| - create_info->download_id == DownloadItem::kInvalidId) {
|
| + bool download_canceled =
|
| + create_info->result == DOWNLOAD_INTERRUPT_REASON_USER_CANCELED &&
|
| + create_info->download_id == DownloadItem::kInvalidId;
|
| + // Also don't start a download if it has to be handed off to OfflinePages.
|
| + download_canceled = download_canceled ||
|
| + create_info->result == DOWNLOAD_INTERRUPT_REASON_PAGE_DOWNLOAD_HANDOFF;
|
| + if (download_canceled) {
|
| if (!callback.is_null())
|
| BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
|
|