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

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

Issue 150079: Enable opening downloads from the Mac download shelf (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « app/gfx/canvas.cc ('k') | chrome/chrome.gyp » ('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 19686)
+++ chrome/browser/download/download_shelf.cc (working copy)
@@ -10,14 +10,11 @@
#include "chrome/browser/dom_ui/downloads_ui.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_manager.h"
+#include "chrome/browser/download/download_util.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
-#if defined(OS_WIN) || defined(OS_LINUX)
-// TODO(port): port this for mac. See two uses below.
-#include "chrome/browser/download/download_util.h"
-#endif
// DownloadShelf ---------------------------------------------------------------
@@ -81,11 +78,7 @@
case OPEN_WHEN_COMPLETE:
return download_->state() != DownloadItem::CANCELLED;
case ALWAYS_OPEN_TYPE:
-#if defined(OS_WIN) || defined(OS_LINUX)
return download_util::CanOpenDownload(download_);
-#else
- return false;
-#endif
case CANCEL:
return download_->state() == DownloadItem::IN_PROGRESS;
default:
@@ -99,9 +92,7 @@
download_->manager()->ShowDownloadInShell(download_);
break;
case OPEN_WHEN_COMPLETE:
-#if defined(OS_WIN) || defined(OS_LINUX)
download_util::OpenDownload(download_);
-#endif
break;
case ALWAYS_OPEN_TYPE: {
const FilePath::StringType extension =
« no previous file with comments | « app/gfx/canvas.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698