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

Issue 185663002: Pass http response headers to the streamsPrivate API callback (Closed)

Created:
6 years, 9 months ago by raymes
Modified:
6 years, 9 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, zork+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Visibility:
Public.

Description

Pass http response headers to the streamsPrivate API callback This passes the response headers through to the API callback allowing the application to access the headers without having to make an additional http request. BUG=303491 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255593

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -8 lines) Patch
M chrome/browser/extensions/api/streams_private/streams_private_api.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/streams_private.idl View 1 2 1 chunk +3 lines, -0 lines 1 comment Download
M chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js View 1 1 chunk +9 lines, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/streams/stream.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/streams/stream.cc View 1 chunk +6 lines, -3 lines 0 comments Download
M content/browser/streams/stream_handle_impl.h View 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/streams/stream_handle_impl.cc View 2 chunks +7 lines, -1 line 0 comments Download
M content/public/browser/stream_handle.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
raymes
6 years, 9 months ago (2014-03-03 06:10:45 UTC) #1
Zachary Kuznia
lgtm https://codereview.chromium.org/185663002/diff/20001/chrome/common/extensions/api/streams_private.idl File chrome/common/extensions/api/streams_private.idl (right): https://codereview.chromium.org/185663002/diff/20001/chrome/common/extensions/api/streams_private.idl#newcode25 chrome/common/extensions/api/streams_private.idl:25: // The HTTP response headers of the itercepted ...
6 years, 9 months ago (2014-03-04 00:48:55 UTC) #2
raymes
+jochen for OWNERS of: chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/common/extensions/api/streams_private.idl content/browser/loader/resource_dispatcher_host_impl.cc content/browser/streams/stream.cc content/browser/streams/stream.h content/browser/streams/stream_handle_impl.cc content/browser/streams/stream_handle_impl.h content/public/browser/stream_handle.h https://codereview.chromium.org/185663002/diff/20001/chrome/common/extensions/api/streams_private.idl File chrome/common/extensions/api/streams_private.idl ...
6 years, 9 months ago (2014-03-05 02:57:47 UTC) #3
raymes
+jochen for OWNERS of: chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/common/extensions/api/streams_private.idl content/browser/loader/resource_dispatcher_host_impl.cc content/browser/streams/stream.cc content/browser/streams/stream.h content/browser/streams/stream_handle_impl.cc content/browser/streams/stream_handle_impl.h content/public/browser/stream_handle.h
6 years, 9 months ago (2014-03-05 02:58:13 UTC) #4
raymes
jochen is OOO so +sky for OWNERS
6 years, 9 months ago (2014-03-05 03:02:25 UTC) #5
sky
Sorry, I'm not familiar with this code and I'm also not an owner in content/public. ...
6 years, 9 months ago (2014-03-05 15:30:15 UTC) #6
jam
lgtm
6 years, 9 months ago (2014-03-05 22:27:33 UTC) #7
raymes
+kalman for chrome/common/extensions/api/streams_private.idl
6 years, 9 months ago (2014-03-05 23:00:57 UTC) #8
not at google - send to devlin
https://codereview.chromium.org/185663002/diff/40001/chrome/common/extensions/api/streams_private.idl File chrome/common/extensions/api/streams_private.idl (right): https://codereview.chromium.org/185663002/diff/40001/chrome/common/extensions/api/streams_private.idl#newcode26 chrome/common/extensions/api/streams_private.idl:26: DOMString responseHeaders; should this be a list of strings?
6 years, 9 months ago (2014-03-05 23:02:38 UTC) #9
raymes
+rsleevi for his thoughts on the API. It's debatable I guess. We could provide the ...
6 years, 9 months ago (2014-03-06 00:31:22 UTC) #10
not at google - send to devlin
Ok. A dictionary of string -> string sounds even better. But lgtm in its current ...
6 years, 9 months ago (2014-03-06 00:35:06 UTC) #11
raymes
The CQ bit was checked by raymes@chromium.org
6 years, 9 months ago (2014-03-06 00:37:30 UTC) #12
raymes
Ok thanks, - I'll make that change in a followup CL! On Thu, Mar 6, ...
6 years, 9 months ago (2014-03-06 00:37:52 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/185663002/40001
6 years, 9 months ago (2014-03-06 00:38:47 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 01:34:40 UTC) #15
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=275896
6 years, 9 months ago (2014-03-06 01:34:41 UTC) #16
raymes
The CQ bit was checked by raymes@chromium.org
6 years, 9 months ago (2014-03-07 06:48:53 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/185663002/40001
6 years, 9 months ago (2014-03-07 06:49:53 UTC) #18
commit-bot: I haz the power
Change committed as 255593
6 years, 9 months ago (2014-03-07 12:05:03 UTC) #19
Ryan Sleevi
On 2014/03/07 12:05:03, I haz the power (commit-bot) wrote: > Change committed as 255593 Sorry ...
6 years, 9 months ago (2014-03-07 22:27:06 UTC) #20
raymes
6 years, 9 months ago (2014-03-09 23:56:45 UTC) #21
I filed crbug.com/350755

I think we should pretty much just expose the raw header string. The
streamsPrivate API intercepts an http response and exposes the body of
the response by passing a blob URL to the extension which can be
streamed using and XHR. The problem is that the headers of the
response are lost. An application could easily re-request the original
headers but it costs an extra http request. So it seems to me that
maybe we should be exposing the missing bit of the response by passing
the raw headers to the application?

On Fri, Mar 7, 2014 at 2:27 PM,  <rsleevi@chromium.org> wrote:
> On 2014/03/07 12:05:03, I haz the power (commit-bot) wrote:
>>
>> Change committed as 255593
>
>
> Sorry for the delay in response.
>
> Would you mind filing a bug specifically to look at what you want to expose
> via
> the streamsPrivate? I absolutely want to make sure we're exposing the right
> thing from the net/ stack.
>
> A map of string -> string isn't going to be strictly sufficient, since
> multiple
> instances of a header may exist (and they may be non-coalescing - aka
> distinct
> values).
>
> I'm not convinced that giving the 'raw' headers to the API is the right
> thing.
> There are so many edge cases with parsing headers, we should be doing right
> by
> the consumers - public or private. As you can note, the
> "GetNormalizedHeaders"
> is an API that should be removed. Not a good sign here for the API - private
> or
> not.
>
> https://codereview.chromium.org/185663002/

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