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

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

Issue 1705613002: Don't create DL shelf on CrOS when showing chrome://downloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more narrow fix so tests don't break Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/chrome_pages.cc
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
index f31ed3a144069c5e8b0ee41e33c0df4487f49af8..2a46f3f5a15ba61c98656f70cc849ab40240a4df 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -158,12 +158,9 @@ void ShowHistory(Browser* browser) {
void ShowDownloads(Browser* browser) {
content::RecordAction(UserMetricsAction("ShowDownloads"));
- if (browser->window()) {
- DownloadShelf* shelf = browser->window()->GetDownloadShelf();
- // The downloads page is always shown in response to a user action.
- if (shelf->IsShowing())
- shelf->Close(DownloadShelf::USER_ACTION);
- }
+ if (browser->window() && browser->window()->IsDownloadShelfVisible())
+ browser->window()->GetDownloadShelf()->Close(DownloadShelf::USER_ACTION);
+
ShowSingletonTabOverwritingNTP(
browser,
GetSingletonTabNavigateParams(browser, GURL(kChromeUIDownloadsURL)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698