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

Issue 281513003: Implement chrome.streamsPrivate.abort() extensions function (Closed)

Created:
6 years, 7 months ago by raymes
Modified:
6 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, zork+watch_chromium.org, chrome-apps-syd-reviews_chromium.org, wjywbs
Visibility:
Public.

Description

Implement chrome.streamsPrivate.abort() extensions function This implements an extensions API to abort a stream that has been started. Aborting the stream will cause the original URL request to be cancelled, which may be desired if the client of the API wants to cancel the request before it is completely downloaded. BUG=348464, 303491 R=jam@chromium.org, kalman@chromium.org, mpearson@chromium.org, zork@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273087

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Total comments: 1

Patch Set 8 : #

Patch Set 9 : #

Total comments: 1

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -3 lines) Patch
M chrome/browser/extensions/api/streams_private/streams_private_api.h View 1 2 3 4 5 6 7 8 2 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_private_api.cc View 1 2 3 4 5 6 7 8 2 chunks +37 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_private_apitest.cc View 1 2 3 4 5 8 2 chunks +30 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/streams_private.idl View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js View 1 2 3 4 5 6 7 8 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/streams_private/handle_mime_type/manifest.json View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/streams/stream_handle_impl.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
M content/browser/streams/stream_handle_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +16 lines, -2 lines 0 comments Download
M content/public/browser/stream_handle.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 1 comment Download

Messages

Total messages: 44 (0 generated)
raymes
Previously the underlying URL request wouldn't be cancelled if you abort() a request for a ...
6 years, 7 months ago (2014-05-12 06:15:50 UTC) #1
raymes
6 years, 7 months ago (2014-05-12 06:16:16 UTC) #2
Zachary Kuznia
This will break the use case where a stream is passed from one reader to ...
6 years, 7 months ago (2014-05-12 09:20:22 UTC) #3
tyoshino (SeeGerritForStatus)
On 2014/05/12 09:20:22, Zachary Kuznia wrote: > This will break the use case where a ...
6 years, 7 months ago (2014-05-12 11:46:07 UTC) #4
raymes
Thanks Zach. PTAL at the new CL. I added a chrome.streamsPrivate.abort() function which takes a ...
6 years, 7 months ago (2014-05-15 03:48:05 UTC) #5
Zachary Kuznia
https://codereview.chromium.org/281513003/diff/40001/chrome/browser/extensions/api/streams_private/streams_private_api.h File chrome/browser/extensions/api/streams_private/streams_private_api.h (right): https://codereview.chromium.org/281513003/diff/40001/chrome/browser/extensions/api/streams_private/streams_private_api.h#newcode73 chrome/browser/extensions/api/streams_private/streams_private_api.h:73: class StreamsPrivateAbortFunction : public AsyncApiFunction { Is there a ...
6 years, 7 months ago (2014-05-15 13:43:26 UTC) #6
raymes
https://codereview.chromium.org/281513003/diff/40001/chrome/browser/extensions/api/streams_private/streams_private_api.h File chrome/browser/extensions/api/streams_private/streams_private_api.h (right): https://codereview.chromium.org/281513003/diff/40001/chrome/browser/extensions/api/streams_private/streams_private_api.h#newcode73 chrome/browser/extensions/api/streams_private/streams_private_api.h:73: class StreamsPrivateAbortFunction : public AsyncApiFunction { On 2014/05/15 13:43:27, ...
6 years, 7 months ago (2014-05-16 01:09:18 UTC) #7
Zachary Kuznia
lgtm
6 years, 7 months ago (2014-05-17 05:40:02 UTC) #8
raymes
The CQ bit was checked by raymes@chromium.org
6 years, 7 months ago (2014-05-19 00:06:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/281513003/60001
6 years, 7 months ago (2014-05-19 00:06:18 UTC) #10
raymes
+mpearson,kalman for OWNERS mpearson: extensions/browser/extension_function_histogram_value.h kalman: chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.h chrome/common/extensions/api/streams_private.idl
6 years, 7 months ago (2014-05-19 00:26:07 UTC) #11
not at google - send to devlin
CL description looks like it's been cut off? Could you add a test?
6 years, 7 months ago (2014-05-19 16:28:16 UTC) #12
Mark P
extensions/browser/extension_function_histogram_value.h lgtm
6 years, 7 months ago (2014-05-19 22:23:53 UTC) #13
raymes
On 2014/05/19 22:23:53, Mark P wrote: > extensions/browser/extension_function_histogram_value.h lgtm Thanks for pushing on the test. ...
6 years, 7 months ago (2014-05-20 03:24:08 UTC) #14
not at google - send to devlin
https://codereview.chromium.org/281513003/diff/100001/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js File chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js (right): https://codereview.chromium.org/281513003/diff/100001/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js#newcode64 chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js:64: if (xhr.status == 200) { how about chrome.test.assertEq(200, xhr.status, ...
6 years, 7 months ago (2014-05-20 19:47:45 UTC) #15
raymes
https://codereview.chromium.org/281513003/diff/100001/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js File chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js (right): https://codereview.chromium.org/281513003/diff/100001/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js#newcode64 chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js:64: if (xhr.status == 200) { hmm but then I ...
6 years, 7 months ago (2014-05-21 00:37:56 UTC) #16
not at google - send to devlin
lgtm https://codereview.chromium.org/281513003/diff/120001/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js File chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js (right): https://codereview.chromium.org/281513003/diff/120001/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js#newcode81 chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js:81: chrome.test.notifyFail( yeah i'm not sure if repeatedly calling ...
6 years, 7 months ago (2014-05-21 01:37:53 UTC) #17
raymes
The CQ bit was checked by raymes@chromium.org
6 years, 7 months ago (2014-05-21 01:46:54 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/281513003/120001
6 years, 7 months ago (2014-05-21 01:51:35 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-21 07:55:39 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-21 09:31:13 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/mac_chromium_rel/builds/31003)
6 years, 7 months ago (2014-05-21 09:31:13 UTC) #22
raymes
kalman@: I had to make a change to the test to prevent flakiness because the ...
6 years, 7 months ago (2014-05-22 23:49:40 UTC) #23
not at google - send to devlin
notifying the extension when the stream is aborted sounds fine, if you actually know when ...
6 years, 7 months ago (2014-05-23 00:10:37 UTC) #24
raymes
Done. I had to add a function to the content API to allow registering a ...
6 years, 7 months ago (2014-05-23 04:25:23 UTC) #25
raymes
On 2014/05/23 04:25:23, raymes wrote: > Done. I had to add a function to the ...
6 years, 7 months ago (2014-05-23 04:25:47 UTC) #26
Zachary Kuznia
lgtm
6 years, 7 months ago (2014-05-23 17:01:13 UTC) #27
not at google - send to devlin
lgtm https://codereview.chromium.org/281513003/diff/260001/chrome/common/extensions/api/streams_private.idl File chrome/common/extensions/api/streams_private.idl (right): https://codereview.chromium.org/281513003/diff/260001/chrome/common/extensions/api/streams_private.idl#newcode40 chrome/common/extensions/api/streams_private.idl:40: AbortCallback callback); consider making this optional.
6 years, 7 months ago (2014-05-23 17:03:48 UTC) #28
raymes
+jam for content API
6 years, 7 months ago (2014-05-26 01:22:29 UTC) #29
jam
On 2014/05/26 01:22:29, raymes wrote: > +jam for content API lgtm
6 years, 7 months ago (2014-05-27 01:35:44 UTC) #30
jam
On 2014/05/26 01:22:29, raymes wrote: > +jam for content API lgtm
6 years, 7 months ago (2014-05-27 01:35:45 UTC) #31
raymes
The CQ bit was checked by raymes@chromium.org
6 years, 7 months ago (2014-05-27 01:45:26 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/281513003/280001
6 years, 7 months ago (2014-05-27 01:45:41 UTC) #33
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-27 02:41:21 UTC) #34
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-27 02:43:55 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_gn_rel/builds/10375)
6 years, 7 months ago (2014-05-27 02:43:56 UTC) #36
raymes
The CQ bit was checked by raymes@chromium.org
6 years, 7 months ago (2014-05-27 06:57:20 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/281513003/300001
6 years, 7 months ago (2014-05-27 06:57:39 UTC) #38
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-27 08:42:50 UTC) #39
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-27 09:09:03 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/77805)
6 years, 7 months ago (2014-05-27 09:09:03 UTC) #41
raymes
Committed patchset #12 manually as r273087 (presubmit successful).
6 years, 7 months ago (2014-05-28 00:27:03 UTC) #42
wjywbs
https://codereview.chromium.org/281513003/diff/320001/extensions/browser/extension_function_histogram_value.h File extensions/browser/extension_function_histogram_value.h (right): https://codereview.chromium.org/281513003/diff/320001/extensions/browser/extension_function_histogram_value.h#newcode844 extensions/browser/extension_function_histogram_value.h:844: STREAMSPRIVATE_ABORT, I think you also need to change tools/metrics/histograms/histograms/histograms.xml ...
6 years, 7 months ago (2014-05-28 00:53:58 UTC) #43
raymes
6 years, 7 months ago (2014-05-28 01:32:48 UTC) #44
Thanks for letting me know, sorry about that! I posted:
https://codereview.chromium.org/307453009/


On Wed, May 28, 2014 at 10:53 AM, <wjywbs@gmail.com> wrote:

>
> https://codereview.chromium.org/281513003/diff/320001/
> extensions/browser/extension_function_histogram_value.h
> File extensions/browser/extension_function_histogram_value.h (right):
>
> https://codereview.chromium.org/281513003/diff/320001/
> extensions/browser/extension_function_histogram_value.h#newcode844
> extensions/browser/extension_function_histogram_value.h:844:
> STREAMSPRIVATE_ABORT,
> I think you also need to change
> tools/metrics/histograms/histograms/histograms.xml as described below.
> For example, https://codereview.chromium.org/299443009 After your fix,
> I'll rebase the histograms of my CL again... Thanks a lot.
>
> https://codereview.chromium.org/281513003/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698