Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[WK2] Make WebPageProxy's setUserAgent private
https://bugs.webkit.org/show_bug.cgi?id=127013

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-14
Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.h:
The API to modify the user agent already has 3 "setters":
-standardUserAgent
-setApplicationNameForUserAgent
-setCustomUserAgent

The method WebPageProxy::setUserAgent() is supposed to be internal, not used directly.
Using it directly would cause unexpected behaviors, for example:
-Set the user agent with setUserAgent.
-Set CustomUserAgent.
-Reset CustomUserAgent.
->The user agent is now standardUserAgent instead of the user agent defined initially.


Canonical link: https://commits.webkit.org/145008@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Benjamin Poulain authored and BenjaminPoulain committed Jan 15, 2014
1 parent d87f535 commit 8a1d96a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,23 @@
2014-01-14 Benjamin Poulain <bpoulain@apple.com>

[WK2] Make WebPageProxy's setUserAgent private
https://bugs.webkit.org/show_bug.cgi?id=127013

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.h:
The API to modify the user agent already has 3 "setters":
-standardUserAgent
-setApplicationNameForUserAgent
-setCustomUserAgent

The method WebPageProxy::setUserAgent() is supposed to be internal, not used directly.
Using it directly would cause unexpected behaviors, for example:
-Set the user agent with setUserAgent.
-Set CustomUserAgent.
-Reset CustomUserAgent.
->The user agent is now standardUserAgent instead of the user agent defined initially.

2014-01-14 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r162000.
Expand Down
3 changes: 2 additions & 1 deletion Source/WebKit2/UIProcess/WebPageProxy.h
Expand Up @@ -522,7 +522,6 @@ class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>

const String& toolTip() const { return m_toolTip; }

void setUserAgent(const String&);
const String& userAgent() const { return m_userAgent; }
void setApplicationNameForUserAgent(const String&);
const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
Expand Down Expand Up @@ -864,6 +863,8 @@ class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>
void resetState();
void resetStateAfterProcessExited();

void setUserAgent(const String&);

// IPC::MessageReceiver
virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) OVERRIDE;
virtual void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) OVERRIDE;
Expand Down

0 comments on commit 8a1d96a

Please sign in to comment.