[webkit-reviews] review granted: [Bug 55086] WebKit2: Need a way to manage cookies from the web process : [Attachment 83585] [PATCH] Fix v3 (Renaming)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 24 06:04:14 PST 2011


Adam Roben (aroben) <aroben at apple.com> has granted Brian Weinstein
<bweinstein at apple.com>'s request for review:
Bug 55086: WebKit2: Need a way to manage cookies from the web process
https://bugs.webkit.org/show_bug.cgi?id=55086

Attachment 83585: [PATCH] Fix v3 (Renaming)
https://bugs.webkit.org/attachment.cgi?id=83585&action=review

------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=83585&action=review

Looks great. Maybe Jessie should take a look before you land, since she caught
the origin vs. hostname issue earlier.

> Source/WebKit2/ChangeLog:56
> +	   (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call
through to the web process to get origins with cookies.

s/origins/hostnames/

> Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp:79
> +	   // FIXME: Log error or assert.

Why leave this as a FIXME? Why not just do it?

> Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp:88
> +    Vector<RefPtr<APIObject> > hostnames;
> +    hostnames.reserveCapacity(hostnameCount);
> +
> +    for (size_t i = 0; i < hostnameCount; ++i)
> +	   hostnames.uncheckedAppend(WebString::create(hostnameList[i]));

Another nearly-equivalent option is:

Vector<RefPtr<APIObject> > hostnames(hostnameCount);
for (size_t i = 0; i < hostnameCount; ++i)
    hostnames[i] = WebString::create(hostnameList[i]);

I think that would be ever-so-slightly clearer. Maybe ever-so-slightly more
efficient, too.

> Source/WebKit2/UIProcess/WebCookieManagerProxy.h:59
> +    void deleteCookiesForHostname(String hostname);

Should be a const String&.


More information about the webkit-reviews mailing list