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

Unified Diff: chrome/browser/download/download_shelf.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 | « chrome/browser/download/download_file.cc ('k') | chrome/browser/gtk/download_item_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_shelf.cc
===================================================================
--- chrome/browser/download/download_shelf.cc (revision 17020)
+++ chrome/browser/download/download_shelf.cc (working copy)
@@ -14,10 +14,9 @@
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
+// TODO(port): port this for mac. See two uses below.
#include "chrome/browser/download/download_util.h"
-#elif defined(OS_POSIX)
-#include "chrome/common/temp_scaffolding_stubs.h"
#endif
// DownloadShelf ---------------------------------------------------------------
@@ -88,10 +87,9 @@
case OPEN_WHEN_COMPLETE:
return download_->state() != DownloadItem::CANCELLED;
case ALWAYS_OPEN_TYPE:
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
return download_util::CanOpenDownload(download_);
-#elif defined(OS_LINUX)
- // Need to implement dangerous download stuff: http://crbug.com/11780
+#else
return false;
#endif
case CANCEL:
@@ -107,11 +105,8 @@
download_->manager()->ShowDownloadInShell(download_);
break;
case OPEN_WHEN_COMPLETE:
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
download_util::OpenDownload(download_);
-#else
- // TODO(port): port download_util
- NOTIMPLEMENTED();
#endif
break;
case ALWAYS_OPEN_TYPE: {
« no previous file with comments | « chrome/browser/download/download_file.cc ('k') | chrome/browser/gtk/download_item_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698