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

Issue 1428833005: MD Downloads: track downloads in C++, dispatch discrete JS updates (Closed)

Created:
5 years, 1 month ago by Dan Beam
Modified:
4 years, 11 months ago
Reviewers:
asanka, sky, dpapad
CC:
asanka, arv+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Downloads: track downloads in C++, dispatch discrete JS updates Instead of both the C++ and the JS needing to create sparse and dense representations of download items (and reconcile the differences in some cases), just keep a sorted representation in C++ and send discrete, positioned updates to the JS. This makes the C++ act more like a controller and makes the JS simply respond to commands in a performant way. R=asanka@chromium.org,dpapad@chromium.org BUG=526577 Committed: https://crrev.com/099dfdd09d2dd8e2d8228c955a89069fc971d625 Cr-Commit-Position: refs/heads/master@{#362063} Committed: https://crrev.com/85f052423a3e2476f1afe4fdc11dfd42ef4439dd Cr-Commit-Position: refs/heads/master@{#362790}

Patch Set 1 : moar testz #

Total comments: 14

Patch Set 2 : asdf #

Total comments: 44

Patch Set 3 : dpapad@ + asanka@ feedback + self-review #

Total comments: 6

Patch Set 4 : dpapad@ review #

Patch Set 5 : silly windows #

Total comments: 2

Patch Set 6 : trim test #

Patch Set 7 : asanka@ review #

Patch Set 8 : GN test fixes #

Patch Set 9 : gyp shufflin #

Patch Set 10 : include_dirs? #

Patch Set 11 : removing gtestjs #

Patch Set 12 : merge #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1092 lines, -529 lines) Patch
M chrome/browser/download/download_query.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/download/download_query.cc View 1 2 3 2 chunks +31 lines, -29 lines 0 comments Download
M chrome/browser/resources/md_downloads/action_service.js View 1 2 3 3 chunks +29 lines, -4 lines 0 comments Download
M chrome/browser/resources/md_downloads/crisper.js View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +104 lines, -51 lines 0 comments Download
A + chrome/browser/resources/md_downloads/i18n.html View 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/browser/resources/md_downloads/manager.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/md_downloads/manager.js View 1 2 3 chunks +75 lines, -47 lines 0 comments Download
A chrome/browser/ui/webui/md_downloads/downloads_list_tracker.h View 1 2 1 chunk +125 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc View 1 2 3 4 1 chunk +394 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc View 1 2 3 4 5 6 1 chunk +276 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h View 5 chunks +10 lines, -44 lines 0 comments Download
M chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc View 10 chunks +19 lines, -349 lines 1 comment Download
M chrome/browser/ui/webui/md_downloads/md_downloads_ui.h View 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -1 line 0 comments Download
M chrome/test/data/webui/md_downloads/layout_tests.js View 1 2 1 chunk +3 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 58 (28 generated)
Dan Beam
+dpapad@ for sanity checking
5 years, 1 month ago (2015-11-20 20:06:16 UTC) #7
dpapad
https://codereview.chromium.org/1428833005/diff/80001/chrome/browser/resources/md_downloads/action_service.js File chrome/browser/resources/md_downloads/action_service.js (right): https://codereview.chromium.org/1428833005/diff/80001/chrome/browser/resources/md_downloads/action_service.js#newcode82 chrome/browser/resources/md_downloads/action_service.js:82: function trim(s) { return s.trim(); } Nit: Add @param, ...
5 years, 1 month ago (2015-11-20 21:55:15 UTC) #8
dpapad
Overall looks good. https://codereview.chromium.org/1428833005/diff/80001/chrome/browser/resources/md_downloads/manager.js File chrome/browser/resources/md_downloads/manager.js (right): https://codereview.chromium.org/1428833005/diff/80001/chrome/browser/resources/md_downloads/manager.js#newcode162 chrome/browser/resources/md_downloads/manager.js:162: Manager.size = function() { I couldn't ...
5 years, 1 month ago (2015-11-20 23:00:19 UTC) #9
Dan Beam
https://codereview.chromium.org/1428833005/diff/80001/chrome/browser/resources/md_downloads/action_service.js File chrome/browser/resources/md_downloads/action_service.js (right): https://codereview.chromium.org/1428833005/diff/80001/chrome/browser/resources/md_downloads/action_service.js#newcode82 chrome/browser/resources/md_downloads/action_service.js:82: function trim(s) { return s.trim(); } On 2015/11/20 21:55:15, ...
5 years, 1 month ago (2015-11-21 01:40:43 UTC) #11
Dan Beam
+asanka@ for his mad downloads knowledge see also: https://docs.google.com/document/d/1XkUDOc6085tir4D5yYEyjL2GsIGBslJBHXiNQDzJawI/edit#heading=h.5bkwghe3572y
5 years, 1 month ago (2015-11-21 04:27:43 UTC) #13
Dan Beam
ping asanka@
5 years ago (2015-11-24 02:53:30 UTC) #15
Dan Beam
(and dpapad@ for that matter)
5 years ago (2015-11-24 02:54:47 UTC) #16
dpapad
LGTM https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/resources/md_downloads/action_service.js File chrome/browser/resources/md_downloads/action_service.js (right): https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/resources/md_downloads/action_service.js#newcode88 chrome/browser/resources/md_downloads/action_service.js:88: var terms = searchText ? searchText.split(/"([^"]*)"/).map(trim) : []; ...
5 years ago (2015-11-24 18:42:33 UTC) #17
asanka
https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/resources/md_downloads/action_service.js File chrome/browser/resources/md_downloads/action_service.js (right): https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/resources/md_downloads/action_service.js#newcode48 chrome/browser/resources/md_downloads/action_service.js:48: return (this.searchText_ || '').length > 0; !!this.searchText_ or do ...
5 years ago (2015-11-24 22:08:23 UTC) #18
Dan Beam
https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/resources/md_downloads/action_service.js File chrome/browser/resources/md_downloads/action_service.js (right): https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/resources/md_downloads/action_service.js#newcode48 chrome/browser/resources/md_downloads/action_service.js:48: return (this.searchText_ || '').length > 0; On 2015/11/24 22:08:22, ...
5 years ago (2015-11-25 04:06:37 UTC) #19
dpapad
https://codereview.chromium.org/1428833005/diff/140001/chrome/browser/resources/md_downloads/action_service.js File chrome/browser/resources/md_downloads/action_service.js (right): https://codereview.chromium.org/1428833005/diff/140001/chrome/browser/resources/md_downloads/action_service.js#newcode32 chrome/browser/resources/md_downloads/action_service.js:32: function notEmpty(s) { return s.length > 0; } Nit: ...
5 years ago (2015-11-25 17:50:47 UTC) #21
Dan Beam
https://codereview.chromium.org/1428833005/diff/140001/chrome/browser/resources/md_downloads/action_service.js File chrome/browser/resources/md_downloads/action_service.js (right): https://codereview.chromium.org/1428833005/diff/140001/chrome/browser/resources/md_downloads/action_service.js#newcode32 chrome/browser/resources/md_downloads/action_service.js:32: function notEmpty(s) { return s.length > 0; } On ...
5 years ago (2015-11-25 20:23:23 UTC) #22
asanka
lgtm https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc File chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc (right): https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc#newcode354 chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc:354: query.AddFilter(should_show_); On 2015/11/25 04:06:36, Dan Beam wrote: > ...
5 years ago (2015-11-25 20:49:06 UTC) #23
Dan Beam
https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc File chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc (right): https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc#newcode124 chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc:124: return CreateMock(mock_items_.size(), mock_items_.size()); On 2015/11/25 20:49:06, asanka wrote: > ...
5 years ago (2015-11-26 01:40:08 UTC) #24
Dan Beam
https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc File chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc (right): https://codereview.chromium.org/1428833005/diff/100001/chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc#newcode277 chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc:277: } On 2015/11/25 04:06:36, Dan Beam wrote: > On ...
5 years ago (2015-11-28 20:59:23 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1428833005/180002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1428833005/180002
5 years ago (2015-11-28 20:59:39 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:180002)
5 years ago (2015-11-28 23:26:31 UTC) #30
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/099dfdd09d2dd8e2d8228c955a89069fc971d625 Cr-Commit-Position: refs/heads/master@{#362063}
5 years ago (2015-11-28 23:27:34 UTC) #32
vabr (Chromium)
A revert of this CL (patchset #7 id:180002) has been created in https://codereview.chromium.org/1480263002/ by vabr@chromium.org. ...
5 years ago (2015-11-30 09:01:20 UTC) #33
Dan Beam
+sky@ for: chrome/chrome_browser_ui.gypi chrome/chrome_tests_unit.gypi chrome/test/BUILD.gn
5 years ago (2015-11-30 19:16:33 UTC) #37
sky
LGTM
5 years ago (2015-11-30 21:26:28 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1428833005/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1428833005/250001
5 years ago (2015-12-01 04:39:11 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/85540)
5 years ago (2015-12-01 05:25:23 UTC) #43
Dan Beam
split the js unit tests to here: https://codereview.chromium.org/1491773002
5 years ago (2015-12-02 01:13:43 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1428833005/330001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1428833005/330001
5 years ago (2015-12-02 04:50:41 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/103808)
5 years ago (2015-12-02 06:45:36 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1428833005/330001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1428833005/330001
5 years ago (2015-12-02 19:37:10 UTC) #53
commit-bot: I haz the power
Committed patchset #12 (id:330001)
5 years ago (2015-12-02 21:00:57 UTC) #55
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/85f052423a3e2476f1afe4fdc11dfd42ef4439dd Cr-Commit-Position: refs/heads/master@{#362790}
5 years ago (2015-12-02 21:01:41 UTC) #57
Dan Beam
4 years, 11 months ago (2016-01-21 02:21:43 UTC) #58
Message was sent while issue was closed.
https://codereview.chromium.org/1428833005/diff/330001/chrome/browser/ui/webu...
File chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc (left):

https://codereview.chromium.org/1428833005/diff/330001/chrome/browser/ui/webu...
chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc:637:
GetMainNotifierManager()->CheckForHistoryFilesRemoval();
^ well, I dropped this on the floor

Powered by Google App Engine
This is Rietveld 408576698