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

Unified Diff: chrome/browser/ui/browser.cc

Issue 10573012: kill --downloads-new-ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index de040df806f5faa506336956155b4d902f9632ed..e1161c0d1ed4907061690545f75d0481a1f261fe 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -282,11 +282,6 @@ bool AllowPanels(const std::string& app_name) {
web_app::GetExtensionIdFromApplicationName(app_name));
}
-bool DisplayOldDownloadsUI() {
- return !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDownloadsNewUI);
-}
-
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -3162,24 +3157,22 @@ void Browser::OnStartDownload(WebContents* source,
if (!window())
return;
- if (DisplayOldDownloadsUI()) {
- // GetDownloadShelf creates the download shelf if it was not yet created.
- DownloadShelf* shelf = window()->GetDownloadShelf();
- shelf->AddDownload(new DownloadItemModel(download));
- // Don't show the animation for "Save file" downloads.
- // For non-theme extensions, we don't show the download animation.
- // Show animation in same window as the download shelf. Download shelf
- // may not be in the same window that initiated the download, e.g.
- // Panels.
- // Don't show the animation if the selected tab is not visible (i.e. the
- // window is minimized, we're in a unit test, etc.).
- WebContents* shelf_tab = shelf->browser()->GetActiveWebContents();
- if ((download->GetTotalBytes() > 0) &&
- !download_crx_util::IsExtensionDownload(*download) &&
- platform_util::IsVisible(shelf_tab->GetNativeView()) &&
- ui::Animation::ShouldRenderRichAnimation()) {
- DownloadStartedAnimation::Show(shelf_tab);
- }
+ // GetDownloadShelf creates the download shelf if it was not yet created.
+ DownloadShelf* shelf = window()->GetDownloadShelf();
+ shelf->AddDownload(new DownloadItemModel(download));
+ // Don't show the animation for "Save file" downloads.
+ // For non-theme extensions, we don't show the download animation.
+ // Show animation in same window as the download shelf. Download shelf
+ // may not be in the same window that initiated the download, e.g.
+ // Panels.
+ // Don't show the animation if the selected tab is not visible (i.e. the
+ // window is minimized, we're in a unit test, etc.).
+ WebContents* shelf_tab = shelf->browser()->GetActiveWebContents();
+ if ((download->GetTotalBytes() > 0) &&
+ !download_crx_util::IsExtensionDownload(*download) &&
+ platform_util::IsVisible(shelf_tab->GetNativeView()) &&
+ ui::Animation::ShouldRenderRichAnimation()) {
+ DownloadStartedAnimation::Show(shelf_tab);
}
// If the download occurs in a new tab, close it.
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698