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

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

Issue 19789018: --disable-download-shelf (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 852fd4dc9438e1d8798f9b4bd8156fdbdd719382..4826c31d36f97ab997b6ab349a4ea524bc99f866 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1255,6 +1255,10 @@ void Browser::ShowDownload(content::DownloadItem* download) {
if (!DownloadItemModel(download).ShouldShowInShelf())
return;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
asanka 2013/07/24 20:09:57 Nit: Check this before the ShowShowInShelf() test
+ switches::kDisableDownloadShelf))
+ return;
+
// GetDownloadShelf creates the download shelf if it was not yet created.
DownloadShelf* shelf = window()->GetDownloadShelf();
shelf->AddDownload(download);

Powered by Google App Engine
This is Rietveld 408576698