Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: chrome/browser/download/download_manager.cc

Issue 7277073: Support for adding save page download items into downloads history. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698