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

Issue 8203005: Implement chrome.experimental.downloads.onChanged (Closed)

Created:
9 years, 2 months ago by benjhayden
Modified:
8 years, 10 months ago
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, mihaip+watch_chromium.org
Visibility:
Public.

Description

Implement chrome.experimental.downloads.onChanged ExtensionDownloadsEventRouter now also observes all DownloadItems and dispatches onChanged events. Download.OnChanged records the percentage of OnDownloadUpdated() calls that are propagated as onChanged events instead of being suppressed. BUG=12133 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121912

Patch Set 1 : " #

Total comments: 7

Patch Set 2 : mixin #

Total comments: 4

Patch Set 3 : on_changed_stats_,OnChangedStat #

Total comments: 2

Patch Set 4 : " #

Total comments: 9

Patch Set 5 : merge #

Patch Set 6 : comments #

Patch Set 7 : merge #

Patch Set 8 : merge #

Patch Set 9 : merge + apitest rewrite #

Patch Set 10 : try re-enabling apitest on mac #

Patch Set 11 : try to fix downloadInterrupted #

Patch Set 12 : merge #

Patch Set 13 : filename windows #

Total comments: 24

Patch Set 14 : comments #

Patch Set 15 : merge #

Total comments: 2

Patch Set 16 : fix post tests #

Patch Set 17 : merge #

Patch Set 18 : debug the new post handler functionality #

Total comments: 4

Patch Set 19 : comments #

Total comments: 1

Patch Set 20 : kill console.logs #

Total comments: 26

Patch Set 21 : fix expected_body #

Total comments: 2

Patch Set 22 : comments #

Patch Set 23 : const downloadId #

Total comments: 8

Patch Set 24 : comments #

Total comments: 6

Patch Set 25 : re-disable apitest on mac -- see 9392013 #

Total comments: 2

Patch Set 26 : indentation #

Patch Set 27 : retry #

Unified diffs Side-by-side diffs Delta from patch set Stats (+525 lines, -103 lines) Patch
M chrome/browser/download/download_extension_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +23 lines, -5 lines 0 comments Download
M chrome/browser/download/download_extension_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +117 lines, -22 lines 0 comments Download
M chrome/test/data/extensions/api_test/downloads/test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +360 lines, -71 lines 0 comments Download
M net/tools/testserver/testserver.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +25 lines, -5 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
benjhayden
9 years, 2 months ago (2011-10-07 17:26:30 UTC) #1
Randy Smith (Not in Mondays)
Gonna hold off on a really detailed review until I get your response to the ...
9 years, 2 months ago (2011-10-12 18:46:30 UTC) #2
benjhayden
PTAL http://codereview.chromium.org/8203005/diff/3004/chrome/browser/extensions/extension_downloads_api.cc File chrome/browser/extensions/extension_downloads_api.cc (right): http://codereview.chromium.org/8203005/diff/3004/chrome/browser/extensions/extension_downloads_api.cc#newcode441 chrome/browser/extensions/extension_downloads_api.cc:441: void ExtensionDownloadsEventRouter::ItemObserver::OnDownloadUpdated( On 2011/10/12 18:46:30, rdsmith wrote: > ...
9 years, 2 months ago (2011-10-13 16:30:28 UTC) #3
Randy Smith (Not in Mondays)
I'm finding myself wondering a bit about keeping a JSONified copy of all the DownloadItems ...
9 years, 2 months ago (2011-10-13 23:42:59 UTC) #4
benjhayden
PTAL WDYT of the SimpleDownloadItem idea below for killing the cached jsons? http://codereview.chromium.org/8203005/diff/3004/chrome/browser/extensions/extension_downloads_api.cc File chrome/browser/extensions/extension_downloads_api.cc ...
9 years, 2 months ago (2011-10-17 19:14:00 UTC) #5
benjhayden
The new Download.OnChanged stat appears to be false (indicating a suppressed OnDownloadUpdated) at least as ...
9 years, 2 months ago (2011-10-17 20:21:22 UTC) #6
benjhayden
+Chris in case you're interested.
9 years, 2 months ago (2011-10-18 19:14:25 UTC) #7
Randy Smith (Not in Mondays)
On 2011/10/17 20:21:22, b s h wrote: > The new Download.OnChanged stat appears to be ...
9 years, 2 months ago (2011-10-18 21:06:33 UTC) #8
Randy Smith (Not in Mondays)
http://codereview.chromium.org/8203005/diff/3004/chrome/browser/extensions/extension_downloads_api.cc File chrome/browser/extensions/extension_downloads_api.cc (right): http://codereview.chromium.org/8203005/diff/3004/chrome/browser/extensions/extension_downloads_api.cc#newcode441 chrome/browser/extensions/extension_downloads_api.cc:441: void ExtensionDownloadsEventRouter::ItemObserver::OnDownloadUpdated( On 2011/10/17 19:14:00, b s h wrote: ...
9 years, 2 months ago (2011-10-18 21:15:32 UTC) #9
cbentzel
I took a very brief look. Why is the extension browser test disabled for onChanged?
9 years, 2 months ago (2011-10-19 19:51:02 UTC) #10
benjhayden
On 2011/10/19 19:51:02, cbentzel wrote: > I took a very brief look. > > Why ...
9 years, 2 months ago (2011-10-20 18:50:58 UTC) #11
benjhayden
On 2011/10/19 19:51:02, cbentzel wrote: > I took a very brief look. > > Why ...
9 years, 2 months ago (2011-10-20 18:50:58 UTC) #12
benjhayden
So, this CL was going to wait for the apitest to be re-enabled, but it ...
9 years ago (2011-12-01 19:25:59 UTC) #13
Randy Smith (Not in Mondays)
On 2011/12/01 19:25:59, b s h wrote: > So, this CL was going to wait ...
9 years ago (2011-12-01 19:53:01 UTC) #14
benjhayden
PTAL. The apitest is re-enabled for win, linux.
8 years, 11 months ago (2012-01-13 21:58:15 UTC) #15
Randy Smith (Not in Mondays)
Remind me of the context here; was this just pushed aside by higher priority items, ...
8 years, 11 months ago (2012-01-15 18:47:13 UTC) #16
benjhayden
On 2012/01/15 18:47:13, rdsmith wrote: > Remind me of the context here; was this just ...
8 years, 11 months ago (2012-01-15 23:55:41 UTC) #17
benjhayden
PTAL I think I've fixed the race conditions in the test on mac, but I'll ...
8 years, 10 months ago (2012-02-01 21:42:39 UTC) #18
Randy Smith (Not in Mondays)
You've added a lot of tests at the .js level, but those tests only test ...
8 years, 10 months ago (2012-02-02 18:10:06 UTC) #19
benjhayden
= Elaborating on the race conditions in the apitest = == The importance of callbackAdded ...
8 years, 10 months ago (2012-02-02 18:16:48 UTC) #20
benjhayden
Please hold the review while I debug more changes to the apitest. I'll say PTAL ...
8 years, 10 months ago (2012-02-02 20:40:38 UTC) #21
benjhayden
PTAL Not sure why the mac bot can't compile, but my test is passing on ...
8 years, 10 months ago (2012-02-03 16:43:38 UTC) #22
Randy Smith (Not in Mondays)
Looks pretty good; I think we're almost done. http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js File chrome/test/data/extensions/api_test/downloads/test.js (right): http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js#newcode59 chrome/test/data/extensions/api_test/downloads/test.js:59: "in ...
8 years, 10 months ago (2012-02-03 20:02:00 UTC) #23
benjhayden
PTAL Chris, you too, please, especially for testserver.py. http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js File chrome/test/data/extensions/api_test/downloads/test.js (right): http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js#newcode59 chrome/test/data/extensions/api_test/downloads/test.js:59: "in ...
8 years, 10 months ago (2012-02-10 18:53:07 UTC) #24
cbentzel
On 2012/02/10 18:53:07, b s h wrote: > PTAL > > Chris, you too, please, ...
8 years, 10 months ago (2012-02-10 20:47:37 UTC) #25
benjhayden
On 2012/02/10 20:47:37, cbentzel wrote: > On 2012/02/10 18:53:07, b s h wrote: > > ...
8 years, 10 months ago (2012-02-10 21:02:43 UTC) #26
cbentzel
Ignore the comment about the "What was the problem" - saw it earlier but it's ...
8 years, 10 months ago (2012-02-10 21:06:30 UTC) #27
benjhayden
http://codereview.chromium.org/8203005/diff/83002/chrome/browser/download/download_extension_apitest.cc File chrome/browser/download/download_extension_apitest.cc (right): http://codereview.chromium.org/8203005/diff/83002/chrome/browser/download/download_extension_apitest.cc#newcode29 chrome/browser/download/download_extension_apitest.cc:29: IN_PROC_BROWSER_TEST_F(DownloadsApiTest, Downloads) { On 2012/02/10 21:06:31, cbentzel wrote: > ...
8 years, 10 months ago (2012-02-10 21:43:17 UTC) #28
cbentzel
All comments are on the api test. I did not review the implementation of onChanged. ...
8 years, 10 months ago (2012-02-10 22:32:51 UTC) #29
Randy Smith (Not in Mondays)
LGTM with one comment below. http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js File chrome/test/data/extensions/api_test/downloads/test.js (right): http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js#newcode59 chrome/test/data/extensions/api_test/downloads/test.js:59: "in test N."); On ...
8 years, 10 months ago (2012-02-13 16:13:08 UTC) #30
benjhayden
PTAL http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js File chrome/test/data/extensions/api_test/downloads/test.js (right): http://codereview.chromium.org/8203005/diff/66001/chrome/test/data/extensions/api_test/downloads/test.js#newcode59 chrome/test/data/extensions/api_test/downloads/test.js:59: "in test N."); On 2012/02/13 16:13:08, rdsmith wrote: ...
8 years, 10 months ago (2012-02-13 19:01:30 UTC) #31
cbentzel
http://codereview.chromium.org/8203005/diff/86003/net/tools/testserver/testserver.py File net/tools/testserver/testserver.py (right): http://codereview.chromium.org/8203005/diff/86003/net/tools/testserver/testserver.py#newcode914 net/tools/testserver/testserver.py:914: _, _, _, _, query_str, _ = urlparse.urlparse(self.path) Feels ...
8 years, 10 months ago (2012-02-13 19:23:37 UTC) #32
asanka
http://codereview.chromium.org/8203005/diff/86003/chrome/test/data/extensions/api_test/downloads/test.js File chrome/test/data/extensions/api_test/downloads/test.js (right): http://codereview.chromium.org/8203005/diff/86003/chrome/test/data/extensions/api_test/downloads/test.js#newcode45 chrome/test/data/extensions/api_test/downloads/test.js:45: const SAFE_FAST_URL = getURL('slow?0'); Avoid 'const', here and elsewhere. ...
8 years, 10 months ago (2012-02-13 19:45:47 UTC) #33
benjhayden
PTAL http://codereview.chromium.org/8203005/diff/86003/chrome/test/data/extensions/api_test/downloads/test.js File chrome/test/data/extensions/api_test/downloads/test.js (right): http://codereview.chromium.org/8203005/diff/86003/chrome/test/data/extensions/api_test/downloads/test.js#newcode45 chrome/test/data/extensions/api_test/downloads/test.js:45: const SAFE_FAST_URL = getURL('slow?0'); On 2012/02/13 19:45:47, asanka ...
8 years, 10 months ago (2012-02-13 21:05:31 UTC) #34
cbentzel
LGTM I'd consider re-enabling the DownloadsApiTest.Downloads test on OSX in a separate CL, so if ...
8 years, 10 months ago (2012-02-13 21:58:01 UTC) #35
benjhayden
Splitting re-enabling the apitest on mac out into a separate CL momentarily. http://codereview.chromium.org/8203005/diff/91003/net/tools/testserver/testserver.py File net/tools/testserver/testserver.py ...
8 years, 10 months ago (2012-02-13 22:05:50 UTC) #36
cbentzel
Still LGTM http://codereview.chromium.org/8203005/diff/91003/net/tools/testserver/testserver.py File net/tools/testserver/testserver.py (right): http://codereview.chromium.org/8203005/diff/91003/net/tools/testserver/testserver.py#newcode929 net/tools/testserver/testserver.py:929: expected_body = query_dict.get('expected_body', []) Should the expected_body ...
8 years, 10 months ago (2012-02-14 00:58:45 UTC) #37
asanka
LGTM. http://codereview.chromium.org/8203005/diff/88015/chrome/test/data/extensions/api_test/downloads/test.js File chrome/test/data/extensions/api_test/downloads/test.js (right): http://codereview.chromium.org/8203005/diff/88015/chrome/test/data/extensions/api_test/downloads/test.js#newcode52 chrome/test/data/extensions/api_test/downloads/test.js:52: 'expected_body=BODY'); Nit: indentation
8 years, 10 months ago (2012-02-14 15:37:22 UTC) #38
benjhayden
Thanks, everybody! I'll hit the CQ when the trybots come back, then I'll mail out ...
8 years, 10 months ago (2012-02-14 15:52:11 UTC) #39
Randy Smith (Not in Mondays)
On 2012/02/14 15:52:11, b s h wrote: > Thanks, everybody! > > I'll hit the ...
8 years, 10 months ago (2012-02-14 15:55:16 UTC) #40
benjhayden
It doesn't depend on this CL in terms of the code. I just wanted to ...
8 years, 10 months ago (2012-02-14 16:29:40 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/8203005/95001
8 years, 10 months ago (2012-02-14 17:30:55 UTC) #42
commit-bot: I haz the power
8 years, 10 months ago (2012-02-14 19:14:51 UTC) #43
Change committed as 121912

Powered by Google App Engine
This is Rietveld 408576698