[Webkit-unassigned] [Bug 38665] [chromium] Update chromium port to send/receive cached metadata

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 11 21:28:28 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38665





--- Comment #17 from Tony Gentilcore <tonyg at chromium.org>  2010-05-11 21:28:27 PST ---
(In reply to comment #16)
> (From update of attachment 55596 [details])
> WebKit/chromium/public/WebKitClient.h:196
>  +      virtual void cacheMetadata(const WebURL&, long long, const char*, size_t) { }
> please document the non-obvious parameters by giving them a name :-)

Done.

> 
> virtual void cacheMetadata(const WebURL&, long long responseTime, const char* data, size_t dataLength) { }
> 
> ordinarily, we use 'double' to represent timestamps in webkit.  is there a reason for using 'long long' instead of 'double'?  i realize that chromium uses long long.

I will completely defer to your recommendation here. Basically this is just an identifier that has to survive a round trip in order to make sure the metadata gets stored with the correct cache entry. The fact that it is a responseTime is really an implementation detail. WebCore never actually touches this field.

So I could see looking at this as either (a) an opaque identifier in which case it could be renamed or (b) as a response time that just happens to be used as this identifier. Please let me know if you prefer I keep it as-is or static_cast it to a double and back. I'll upload the updated patch after we figure this out.

> 
> WebKit/chromium/public/WebURLLoaderClient.h:60
>  +      virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength) { }
> i presume it is promised that didReceiveCachedMetadata will not be called after didFinishLoading or didFail, right?

Yes. That is my intent. Here is where I'm planning to send the metadata:
http://codereview.chromium.org/1698001/diff/39001/28009

> 
> WebKit/chromium/public/WebURLResponse.h:75
>  +      WEBKIT_API long long responseTime() const;
> same comment about 'long long' versus 'double'

Yes. I'll keep them in sync based on your answer to my question above.

> 
> WebKit/chromium/src/ResourceHandle.cpp:176
>  +  void ResourceHandleInternal::didReceiveCachedMetadata(
> no line break here in webkit style

Done.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list