Bug 89028 - [chromium] Rename WebFrameClient::userAgent() to better reflect what it does
Summary: [chromium] Rename WebFrameClient::userAgent() to better reflect what it does
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: dfalcantara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-13 11:56 PDT by dfalcantara
Modified: 2012-06-15 14:02 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.24 KB, patch)
2012-06-13 14:52 PDT, dfalcantara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dfalcantara 2012-06-13 11:56:49 PDT
WebFrameClient::userAgent() was added in https://bugs.webkit.org/show_bug.cgi?id=83959
However, the name isn't as clear as it could be because it returns a boolean and has an out parameter.

The signature of the function should be changed from:
"bool userAgent(URL, *WebString)"

to something like:
"WebString userAgentOverride(URL)"

where the WebString directly contains the user agent override if one is necessary, and "" if not.
Comment 1 dfalcantara 2012-06-13 14:52:30 PDT
Created attachment 147417 [details]
Patch
Comment 2 WebKit Review Bot 2012-06-13 14:57:49 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 WebKit Review Bot 2012-06-14 00:36:31 PDT
Comment on attachment 147417 [details]
Patch

Clearing flags on attachment: 147417

Committed r120292: <http://trac.webkit.org/changeset/120292>
Comment 4 WebKit Review Bot 2012-06-14 00:36:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Fisher (:fishd, Google) 2012-06-14 22:18:46 PDT
Comment on attachment 147417 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=147417&action=review

> Source/WebKit/chromium/public/WebFrameClient.h:403
> +    virtual WebString userAgentOverride(const WebURL& url) { return WebString(); }

By the way, WebFrameClient methods generally all start with a WebFrame pointer.
That way, the embedder can determine the context for a request.  It is not
always needed by Chrome, but we have tried to be consistent with this interface.
Comment 6 dfalcantara 2012-06-15 14:02:25 PDT
(In reply to comment #5)
> By the way, WebFrameClient methods generally all start with a WebFrame pointer.
> That way, the embedder can determine the context for a request.  It is not
> always needed by Chrome, but we have tried to be consistent with this interface.

I opened and filed a patch under https://bugs.webkit.org/show_bug.cgi?id=89233 to fix it.  Thanks for catching it!