Bug 86917 - [chromium] Expose processed headers from ResourceResponseBase through WebURLResponse
Summary: [chromium] Expose processed headers from ResourceResponseBase through WebURLR...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ami Fischman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-18 15:56 PDT by Ami Fischman
Modified: 2012-05-23 15:55 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.96 KB, patch)
2012-05-18 15:57 PDT, Ami Fischman
no flags Details | Formatted Diff | Diff
Patch (4.15 KB, patch)
2012-05-18 20:00 PDT, Ami Fischman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ami Fischman 2012-05-18 15:56:07 PDT
ResourceResponseBase has a number of accessors for processed versions of HTTP headers.  I'd like to use these from chromium code that only has a handle to WebURLResponse so I want to plumb them through.
Comment 1 Ami Fischman 2012-05-18 15:57:50 PDT
Created attachment 142808 [details]
Patch
Comment 2 WebKit Review Bot 2012-05-18 15:59:03 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Ami Fischman 2012-05-18 16:00:38 PDT
One thing I'm unsure of is how to decide what to expose.  This patch is minimal; I only exposed what I need for https://chromiumcodereview.appspot.com/10387200
Alternately, I could expose every RRB accessor, or just every RRB accessor from this block that I grabbed most of these from.  Thoughts?
Comment 4 James Robinson 2012-05-18 16:17:20 PDT
Hmm...so some WebCore code is doing network fetches via Resource*, which then calls out to chromium via Platform WebURL*.  The response then comes back in and is piped back in to WebCore which makes calls on its client which then pipes back out to chromium.  Then in chromium code you want to grab fields off of the WebURLResponse which is wrapping the WebCore::ResourceResponse which is wrapping the data passed in via WebKit API earlier on the stack...

Seems to be a whole lotta bouncing back and forth.  Is this the right place to hook in for this data?
Comment 5 Ami Fischman 2012-05-18 16:35:25 PDT
(In reply to comment #4)
> Hmm...so some WebCore code is doing network fetches via Resource*, which then calls out to chromium via Platform WebURL*.  The response then comes back in and is piped back in to WebCore which makes calls on its client which then pipes back out to chromium.  Then in chromium code you want to grab fields off of the WebURLResponse which is wrapping the WebCore::ResourceResponse which is wrapping the data passed in via WebKit API earlier on the stack...
> 
> Seems to be a whole lotta bouncing back and forth.  Is this the right place to hook in for this data?

Hell if I know.  I agree that there's a whole lotta bouncing around.  Both this and my previous webkit CL (issue 86522) are 100% motivated by the fact that the current architecture of everything has data flowing like:
webkit/media <-- WebKit <-- net/http
(where the outer two elements are chromium).  If webkit/media could access the net/http response headers/object I'd be happy as a clam and no webkit changes would be necessary.  But AFAICT the above data flow is WorkingAsIntended, and the fact that webkit/media can't poke through to the net/http layer is intentional.

I'm open to other suggestions if you/others have any...
Comment 6 Ami Fischman 2012-05-18 20:00:20 PDT
Created attachment 142845 [details]
Patch
Comment 7 Adam Barth 2012-05-21 15:22:09 PDT
I'm going to defer to James and/or fishd for this patch.
Comment 8 Ami Fischman 2012-05-23 15:55:09 PDT
Discussed w/ Darin Fisher and decided these accessors are not necessarily the API WebKit wants to expose.  Instead, implemented everything I need in terms of chromium changes (see https://chromiumcodereview.appspot.com/10387200, patchset #3 and later).
Closing as WONTFIX.