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

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

Issue 112064: Linux: call xdg-open on downloaded files to open them. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix typos Created 11 years, 7 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
« no previous file with comments | « app/win_util.cc ('k') | chrome/browser/download/download_shelf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_file.cc
===================================================================
--- chrome/browser/download/download_file.cc (revision 17020)
+++ chrome/browser/download/download_file.cc (working copy)
@@ -530,24 +530,23 @@
platform_util::ShowItemInFolder(full_path);
}
-// Launches the selected download using ShellExecute 'open' verb. If there is
-// a valid parent window, the 'safer' version will be used which can
+// Launches the selected download using ShellExecute 'open' verb. For windows,
+// if there is a valid parent window, the 'safer' version will be used which can
// display a modal dialog asking for user consent on dangerous files.
void DownloadFileManager::OnOpenDownloadInShell(const FilePath& full_path,
const GURL& url,
gfx::NativeView parent_window) {
-#if defined(OS_WIN)
DCHECK(MessageLoop::current() == file_loop_);
+
+#if defined(OS_WIN)
if (NULL != parent_window) {
win_util::SaferOpenItemViaShell(parent_window, L"", full_path,
- UTF8ToWide(url.spec()), true);
- } else {
- win_util::OpenItemViaShell(full_path, true);
+ UTF8ToWide(url.spec()));
+ return;
}
-#else
- // TODO(port) implement me.
- NOTREACHED();
#endif
+
+ platform_util::OpenItem(full_path);
}
// The DownloadManager in the UI thread has provided a final name for the
« no previous file with comments | « app/win_util.cc ('k') | chrome/browser/download/download_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698