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

Issue 10854127: Rewrite DownloadsDOMHandler (Closed)

Created:
8 years, 4 months ago by benjhayden
Modified:
8 years, 4 months ago
CC:
chromium-reviews, asanka, Randy Smith (Not in Mondays)
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=153116

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 10

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Total comments: 6

Patch Set 11 : . #

Total comments: 2

Patch Set 12 : . #

Patch Set 13 : . #

Total comments: 42

Patch Set 14 : . #

Patch Set 15 : . #

Total comments: 19

Patch Set 16 : . #

Patch Set 17 : . #

Patch Set 18 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+396 lines, -230 lines) Patch
M chrome/browser/ui/webui/downloads_dom_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +44 lines, -27 lines 0 comments Download
M chrome/browser/ui/webui/downloads_dom_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 11 chunks +186 lines, -203 lines 0 comments Download
A chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +165 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
benjhayden
PTAL Bug fix by sledgehammer :-)
8 years, 4 months ago (2012-08-13 20:21:29 UTC) #1
benjhayden
PTAL with the beginnings of a test. Please feel free to suggest specifically what other ...
8 years, 4 months ago (2012-08-14 19:51:16 UTC) #2
Randy Smith (Not in Mondays)
Sending intermediate comments since my comment on the destructor may result in moderate sized changes. ...
8 years, 4 months ago (2012-08-15 19:04:16 UTC) #3
Randy Smith (Not in Mondays)
Thoughts on tests: You're really close to pure unit-test level isolation (which is awesome), and ...
8 years, 4 months ago (2012-08-15 19:26:28 UTC) #4
Randy Smith (Not in Mondays)
One more question. http://codereview.chromium.org/10854127/diff/12/base/nix/mime_util_xdg.cc File base/nix/mime_util_xdg.cc (right): http://codereview.chromium.org/10854127/diff/12/base/nix/mime_util_xdg.cc#newcode591 base/nix/mime_util_xdg.cc:591: if (filepath.empty()) return ""; Right, sorry. ...
8 years, 4 months ago (2012-08-15 19:30:31 UTC) #5
benjhayden
PTAL http://codereview.chromium.org/10854127/diff/12/base/nix/mime_util_xdg.cc File base/nix/mime_util_xdg.cc (right): http://codereview.chromium.org/10854127/diff/12/base/nix/mime_util_xdg.cc#newcode591 base/nix/mime_util_xdg.cc:591: if (filepath.empty()) return ""; On 2012/08/15 19:30:31, rdsmith ...
8 years, 4 months ago (2012-08-16 18:52:09 UTC) #6
Randy Smith (Not in Mondays)
LGTM. WRT the comments below: * Please do the doc request. * Please do the ...
8 years, 4 months ago (2012-08-17 17:49:47 UTC) #7
benjhayden
Asanka? http://codereview.chromium.org/10854127/diff/4007/chrome/browser/ui/webui/downloads_dom_handler.cc File chrome/browser/ui/webui/downloads_dom_handler.cc (right): http://codereview.chromium.org/10854127/diff/4007/chrome/browser/ui/webui/downloads_dom_handler.cc#newcode220 chrome/browser/ui/webui/downloads_dom_handler.cc:220: !item.GetTargetFilePath().empty()); On 2012/08/17 17:49:47, rdsmith wrote: > This ...
8 years, 4 months ago (2012-08-17 20:54:15 UTC) #8
asanka
http://codereview.chromium.org/10854127/diff/3012/chrome/browser/ui/webui/downloads_dom_handler.cc File chrome/browser/ui/webui/downloads_dom_handler.cc (right): http://codereview.chromium.org/10854127/diff/3012/chrome/browser/ui/webui/downloads_dom_handler.cc#newcode324 chrome/browser/ui/webui/downloads_dom_handler.cc:324: if (IsDownloadDisplayable(*download_item) && OnDownloadCreated() is also called for temporary ...
8 years, 4 months ago (2012-08-17 21:19:49 UTC) #9
benjhayden
http://codereview.chromium.org/10854127/diff/3012/chrome/browser/ui/webui/downloads_dom_handler.cc File chrome/browser/ui/webui/downloads_dom_handler.cc (right): http://codereview.chromium.org/10854127/diff/3012/chrome/browser/ui/webui/downloads_dom_handler.cc#newcode324 chrome/browser/ui/webui/downloads_dom_handler.cc:324: if (IsDownloadDisplayable(*download_item) && On 2012/08/17 21:19:49, asanka wrote: > ...
8 years, 4 months ago (2012-08-17 21:36:30 UTC) #10
asanka
LGTM
8 years, 4 months ago (2012-08-17 21:43:01 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/10854127/7014
8 years, 4 months ago (2012-08-18 20:46:55 UTC) #12
commit-bot: I haz the power
Presubmit check for 10854127-7014 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-18 20:47:01 UTC) #13
benjhayden
James, PTAL for OWNERShip. Thanks!
8 years, 4 months ago (2012-08-18 20:50:03 UTC) #14
James Hawkins
http://codereview.chromium.org/10854127/diff/7014/chrome/browser/ui/webui/downloads_dom_handler.cc File chrome/browser/ui/webui/downloads_dom_handler.cc (right): http://codereview.chromium.org/10854127/diff/7014/chrome/browser/ui/webui/downloads_dom_handler.cc#newcode265 chrome/browser/ui/webui/downloads_dom_handler.cc:265: if (original_profile_download_manager_) { Remove added braces; the precedence in ...
8 years, 4 months ago (2012-08-19 06:17:29 UTC) #15
benjhayden
PTAL http://codereview.chromium.org/10854127/diff/7014/chrome/browser/ui/webui/downloads_dom_handler.cc File chrome/browser/ui/webui/downloads_dom_handler.cc (right): http://codereview.chromium.org/10854127/diff/7014/chrome/browser/ui/webui/downloads_dom_handler.cc#newcode265 chrome/browser/ui/webui/downloads_dom_handler.cc:265: if (original_profile_download_manager_) { On 2012/08/19 06:17:29, James Hawkins ...
8 years, 4 months ago (2012-08-19 22:20:27 UTC) #16
James Hawkins
http://codereview.chromium.org/10854127/diff/7014/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc File chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc (right): http://codereview.chromium.org/10854127/diff/7014/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc#newcode23 chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc:23: CHECK(right_value->GetAsList(&right_list)); On 2012/08/19 22:20:27, benjhayden_chromium wrote: > On 2012/08/19 ...
8 years, 4 months ago (2012-08-22 17:39:00 UTC) #17
benjhayden
PTAL http://codereview.chromium.org/10854127/diff/5029/chrome/browser/ui/webui/downloads_dom_handler.cc File chrome/browser/ui/webui/downloads_dom_handler.cc (right): http://codereview.chromium.org/10854127/diff/5029/chrome/browser/ui/webui/downloads_dom_handler.cc#newcode218 chrome/browser/ui/webui/downloads_dom_handler.cc:218: // Filter out extension downloads and downloads that ...
8 years, 4 months ago (2012-08-22 20:19:22 UTC) #18
James Hawkins
LGTM with on doc request. http://codereview.chromium.org/10854127/diff/5029/chrome/browser/ui/webui/downloads_dom_handler.cc File chrome/browser/ui/webui/downloads_dom_handler.cc (right): http://codereview.chromium.org/10854127/diff/5029/chrome/browser/ui/webui/downloads_dom_handler.cc#newcode374 chrome/browser/ui/webui/downloads_dom_handler.cc:374: if (!file || !web_contents) ...
8 years, 4 months ago (2012-08-22 20:24:20 UTC) #19
benjhayden
Thanks, everybody! I'll hit the CQ when some of the trybots turn green. http://codereview.chromium.org/10854127/diff/5029/chrome/browser/ui/webui/downloads_dom_handler.cc File ...
8 years, 4 months ago (2012-08-23 16:48:57 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/10854127/20002
8 years, 4 months ago (2012-08-23 21:32:59 UTC) #21
commit-bot: I haz the power
8 years, 4 months ago (2012-08-24 00:03:46 UTC) #22
Change committed as 153116

Powered by Google App Engine
This is Rietveld 408576698