summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authormhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 01:13:00 +0000
committermhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 01:13:00 +0000
commit068beab17f2100eadfe234ae01d8f4a57c1d6787 (patch)
tree6c1d5918d2f02965bd05bf2dc03a715e6d2f61a7 /chrome/browser/download
parent5b3a670dc03ac0233f8bdeb1e575c18fe3980082 (diff)
downloadchromium_src-068beab17f2100eadfe234ae01d8f4a57c1d6787.zip
chromium_src-068beab17f2100eadfe234ae01d8f4a57c1d6787.tar.gz
chromium_src-068beab17f2100eadfe234ae01d8f4a57c1d6787.tar.bz2
Remove the context menu item 'Remove from shelf' from download shelf
BUG=23078 TEST=No more menu item on download item Review URL: http://codereview.chromium.org/246004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_shelf.cc11
-rw-r--r--chrome/browser/download/download_shelf.h1
2 files changed, 0 insertions, 12 deletions
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index 40d8bef..ba41c16 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -59,8 +59,6 @@ std::wstring DownloadShelfContextMenu::GetItemLabel(int id) const {
return l10n_util::GetString(IDS_DOWNLOAD_MENU_ALWAYS_OPEN_TYPE);
case CANCEL:
return l10n_util::GetString(IDS_DOWNLOAD_MENU_CANCEL);
- case REMOVE_ITEM:
- return l10n_util::GetString(IDS_DOWNLOAD_MENU_REMOVE_ITEM);
case TOGGLE_PAUSE: {
if (download_->is_paused())
return l10n_util::GetString(IDS_DOWNLOAD_MENU_RESUME_ITEM);
@@ -82,9 +80,6 @@ bool DownloadShelfContextMenu::IsItemCommandEnabled(int id) const {
return download_util::CanOpenDownload(download_);
case CANCEL:
return download_->state() == DownloadItem::IN_PROGRESS;
- case REMOVE_ITEM:
- return download_->state() == DownloadItem::COMPLETE ||
- download_->state() == DownloadItem::CANCELLED;
case TOGGLE_PAUSE:
return download_->state() == DownloadItem::IN_PROGRESS;
default:
@@ -110,12 +105,6 @@ void DownloadShelfContextMenu::ExecuteItemCommand(int id) {
case CANCEL:
model_->CancelTask();
break;
- case REMOVE_ITEM:
- download_->Remove(false);
- // |download_| has been deleted now, prevent further access to it.
- download_ = NULL;
- model_ = NULL;
- break;
case TOGGLE_PAUSE:
// It is possible for the download to complete before the user clicks the
// menu item, recheck if the download is in progress state before toggling
diff --git a/chrome/browser/download/download_shelf.h b/chrome/browser/download/download_shelf.h
index bc014cd..21d652e 100644
--- a/chrome/browser/download/download_shelf.h
+++ b/chrome/browser/download/download_shelf.h
@@ -57,7 +57,6 @@ class DownloadShelfContextMenu {
OPEN_WHEN_COMPLETE, // Open the download when it's finished.
ALWAYS_OPEN_TYPE, // Default this file extension to always open.
CANCEL, // Cancel the download.
- REMOVE_ITEM, // Removes the item from the download shelf.
TOGGLE_PAUSE, // Temporarily pause a download.
MENU_LAST
};