diff options
author | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 20:18:02 +0000 |
---|---|---|
committer | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 20:18:02 +0000 |
commit | 631d1ab9de83c531ca43b8134226eb247a4ee3aa (patch) | |
tree | b1445a64a9269065b394a1b7a31b6fcff989f010 | |
parent | 95234df98c31158c55e9732cdf682ed5e1e8e71a (diff) | |
download | chromium_src-631d1ab9de83c531ca43b8134226eb247a4ee3aa.zip chromium_src-631d1ab9de83c531ca43b8134226eb247a4ee3aa.tar.gz chromium_src-631d1ab9de83c531ca43b8134226eb247a4ee3aa.tar.bz2 |
NNTP: Only show completed downloads.
BUG=16719
TEST=Download a big file (http://www.thinkbroadband.com/download.html
has good files for testing downloads) and make sure that that cancelled
and in progress downloads are not shown on the new tab page.
Review URL: http://codereview.chromium.org/149685
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20780 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/new_new_tab.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js index 99ebe9c..2408e83 100644 --- a/chrome/browser/resources/new_new_tab.js +++ b/chrome/browser/resources/new_new_tab.js @@ -91,6 +91,11 @@ function mostVisitedPages(data) { function downloadsList(data) { logEvent('received downloads'); + + // We should only show complete downloads. + data = data.filter(function(d) { + return d.state == 'COMPLETE'; + }); data.length = Math.min(data.length, 5); processData('#download-items', data); } |