Rewrite DownloadsDOMHandler
commite65779e2ac1a541dd95ee8829b4ee362f412de79
authorbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 24 Aug 2012 00:03:38 +0000 (24 00:03 +0000)
committerbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 24 Aug 2012 00:03:38 +0000 (24 00:03 +0000)
tree9b0c86a194383d20229d63ede40c5d715d933976
parent2a0b5ea5634e6935b47931f5943f9a73fa40872b
Rewrite DownloadsDOMHandler
Instead of keeping its own vector of items, let DownloadManager keep track of items. That's what it's for.
Instead of using items' position in the vector as an identifier, use DownloadItem::GetId(). That's what it's for.
Add a test for DownloadsDOMHandler.
BUG=142389

Review URL: https://chromiumcodereview.appspot.com/10854127

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153116 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/ui/webui/downloads_dom_handler.cc
chrome/browser/ui/webui/downloads_dom_handler.h
chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc [new file with mode: 0644]
chrome/chrome_tests.gypi