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

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

Issue 3177034: Makes the download shelf auto-close after the user opens all downloads (Closed)
Patch Set: Have OnDownloadOpened invoked before opened to match old behavior Created 10 years, 4 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
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 9b2d4b59bc091a8a62ba412b172f8a3e1b602c2d..9d5a1a7514f37f66b88c8b95020802e62d6a162a 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -920,21 +920,23 @@ void DownloadManager::ShowDownloadInShell(const DownloadItem* download) {
#endif
}
-void DownloadManager::OpenDownload(const DownloadItem* download,
+void DownloadManager::OpenDownload(DownloadItem* download,
gfx::NativeView parent_window) {
// Open Chrome extensions with ExtensionsService. For everything else do shell
// execute.
if (download->is_extension_install()) {
+ download->Opened();
download_util::OpenChromeExtension(profile_, this, *download);
} else {
OpenDownloadInShell(download, parent_window);
}
}
-void DownloadManager::OpenDownloadInShell(const DownloadItem* download,
+void DownloadManager::OpenDownloadInShell(DownloadItem* download,
gfx::NativeView parent_window) {
DCHECK(file_manager_);
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ download->Opened();
#if defined(OS_MACOSX)
// Mac OS X requires opening downloads on the UI thread.
platform_util::OpenItem(download->full_path());

Powered by Google App Engine
This is Rietveld 408576698