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

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

Issue 2044233002: Remove download resumption feature flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/browser/download/download_shelf_context_menu.cc
diff --git a/chrome/browser/download/download_shelf_context_menu.cc b/chrome/browser/download/download_shelf_context_menu.cc
index 441bf254f98ccb4cd80060b3d6972eb30130b01f..53dc0235bad8ccdd4586314bbadff16cca01b28b 100644
--- a/chrome/browser/download/download_shelf_context_menu.cc
+++ b/chrome/browser/download/download_shelf_context_menu.cc
@@ -17,15 +17,6 @@
using content::DownloadItem;
-namespace {
-
-// Returns true if downloads resumption is enabled.
-bool IsDownloadResumptionEnabled() {
- return base::FeatureList::IsEnabled(features::kDownloadResumption);
-}
-
-} // namespace
-
DownloadShelfContextMenu::~DownloadShelfContextMenu() {
DetachFromDownloadItem();
}
@@ -264,23 +255,13 @@ ui::SimpleMenuModel* DownloadShelfContextMenu::GetFinishedMenuModel() {
}
ui::SimpleMenuModel* DownloadShelfContextMenu::GetInterruptedMenuModel() {
-#if !defined(OS_WIN)
- // If resumption isn't enabled and we aren't on Windows, then none of the
- // options here are applicable.
- if (!IsDownloadResumptionEnabled())
- return GetInProgressMenuModel();
-#endif
-
if (interrupted_download_menu_model_)
return interrupted_download_menu_model_.get();
interrupted_download_menu_model_.reset(new ui::SimpleMenuModel(this));
- if (IsDownloadResumptionEnabled()) {
- interrupted_download_menu_model_->AddItem(
- DownloadCommands::RESUME,
- GetLabelForCommandId(DownloadCommands::RESUME));
- }
+ interrupted_download_menu_model_->AddItem(
+ DownloadCommands::RESUME, GetLabelForCommandId(DownloadCommands::RESUME));
#if defined(OS_WIN)
// The Help Center article is currently Windows specific.
// TODO(asanka): Enable this for other platforms when the article is expanded
@@ -289,12 +270,9 @@ ui::SimpleMenuModel* DownloadShelfContextMenu::GetInterruptedMenuModel() {
DownloadCommands::LEARN_MORE_INTERRUPTED,
GetLabelForCommandId(DownloadCommands::LEARN_MORE_INTERRUPTED));
#endif
- if (IsDownloadResumptionEnabled()) {
- interrupted_download_menu_model_->AddSeparator(ui::NORMAL_SEPARATOR);
- interrupted_download_menu_model_->AddItem(
- DownloadCommands::CANCEL,
- GetLabelForCommandId(DownloadCommands::CANCEL));
- }
+ interrupted_download_menu_model_->AddSeparator(ui::NORMAL_SEPARATOR);
+ interrupted_download_menu_model_->AddItem(
+ DownloadCommands::CANCEL, GetLabelForCommandId(DownloadCommands::CANCEL));
return interrupted_download_menu_model_.get();
}
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698