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.
Created attachment 147417 [details] Patch
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 on attachment 147417 [details] Patch Clearing flags on attachment: 147417 Committed r120292: <http://trac.webkit.org/changeset/120292>
All reviewed patches have been landed. Closing bug.
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.
(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!