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); |