Chromium Code Reviews| Index: chrome/browser/ui/browser.cc |
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
| index 187682db841f6f359bb54a9f76e7c1462cf504cf..47dd0f74988eb985af0ebc04a7b2a1a266c042bb 100644 |
| --- a/chrome/browser/ui/browser.cc |
| +++ b/chrome/browser/ui/browser.cc |
| @@ -1479,7 +1479,8 @@ int Browser::GetExtraRenderViewHeight() const { |
| void Browser::OnStartDownload(WebContents* source, |
| content::DownloadItem* download) { |
| - if (!download_util::ShouldShowInShelf(download)) |
| + scoped_ptr<DownloadItemModel> download_model(new DownloadItemModel(download)); |
| + if (!download_model->ShouldShowInShelf()) |
| return; |
| WebContents* constrained = GetConstrainingWebContents(source); |
| @@ -1494,7 +1495,7 @@ void Browser::OnStartDownload(WebContents* source, |
| // GetDownloadShelf creates the download shelf if it was not yet created. |
| DownloadShelf* shelf = window()->GetDownloadShelf(); |
| - shelf->AddDownload(new DownloadItemModel(download)); |
| + shelf->AddDownload(download_model.release()); |
|
sky
2012/12/10 18:04:52
Would be nice to use download_model.Pass() here. M
asanka
2012/12/10 18:52:14
I'll do this in a follow-up CL next.
|
| // 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 |