Index: chrome/browser/download/download_manager.cc |
=================================================================== |
--- chrome/browser/download/download_manager.cc (revision 91326) |
+++ chrome/browser/download/download_manager.cc (working copy) |
@@ -975,9 +975,6 @@ |
save_page_as_downloads_.insert(download); |
#endif |
downloads_.insert(download); |
- // Add to history and notify observers. |
- AddDownloadItemToHistory(download, DownloadHistory::kUninitializedHandle); |
- NotifyModelChanged(); |
} |
// Initiate a download of a specific URL. We send the request to the |
@@ -1182,6 +1179,13 @@ |
DCHECK(!ContainsKey(history_downloads_, download->db_handle())); |
history_downloads_[download->db_handle()] = download; |
+ |
+ // Show in the appropriate browser UI. |
+ // This includes buttons to save or cancel, for a dangerous download. |
+ ShowDownloadInBrowser(download); |
+ |
+ // Inform interested objects about the new download. |
+ NotifyModelChanged(); |
} |
// Once the new DownloadItem's creation info has been committed to the history |
@@ -1200,13 +1204,6 @@ |
AddDownloadItemToHistory(download, db_handle); |
- // Show in the appropriate browser UI. |
- // This includes buttons to save or cancel, for a dangerous download. |
- ShowDownloadInBrowser(download); |
- |
- // Inform interested objects about the new download. |
- NotifyModelChanged(); |
- |
// If the download is still in progress, try to complete it. |
// |
// Otherwise, download has been cancelled or interrupted before we've |