diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-22 19:44:41 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-22 19:44:41 +0000 |
commit | 6568e6bb74a14bb6be71c1963c223ebe51eb4b4d (patch) | |
tree | 3855fdcd8a01d31682d566a9317b95a67b4fee3a /content/shell | |
parent | 9d43e371e6c0b70b938575690f561f3742ad8397 (diff) | |
download | chromium_src-6568e6bb74a14bb6be71c1963c223ebe51eb4b4d.zip chromium_src-6568e6bb74a14bb6be71c1963c223ebe51eb4b4d.tar.gz chromium_src-6568e6bb74a14bb6be71c1963c223ebe51eb4b4d.tar.bz2 |
Remove webkit_glue::BuildUserAgent(), change the contract in webkit_glue so that SetUserAgent() must be called before GetUserAgent().
This was causing a dependency inversion between webkit_support and its clients, and was needed for the content component build.
For content users, calling SetContentClient() will automatically initialize the user agent (retrieved from client->GetUserAgent()).
As a bonus, fixing this allowed me to re-test the "mimic_windows" code path and it looks like we no longer need it.
R=jam@chromium.org,tony@chromium.org
BUG=11136,90442
TEST=visit yahoo! mail using Chromium on Linux, ensure that we don't get an "unsupported browser" warning.
Review URL: http://codereview.chromium.org/7922023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102336 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/shell_content_client.cc | 5 | ||||
-rw-r--r-- | content/shell/shell_content_client.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/content/shell/shell_content_client.cc b/content/shell/shell_content_client.cc index 644fd98..5caaef0 100644 --- a/content/shell/shell_content_client.cc +++ b/content/shell/shell_content_client.cc @@ -30,8 +30,9 @@ bool ShellContentClient::CanHandleWhileSwappedOut(const IPC::Message& msg) { return false; } -std::string ShellContentClient::GetUserAgent(bool mimic_windows) const { - return webkit_glue::BuildUserAgentHelper(mimic_windows, "Chrome/15.16.17.18"); +std::string ShellContentClient::GetUserAgent(bool* overriding) const { + *overriding = false; + return std::string("Chrome/15.16.17.18"); } string16 ShellContentClient::GetLocalizedString(int message_id) const { diff --git a/content/shell/shell_content_client.h b/content/shell/shell_content_client.h index 35b2020..d0644d4 100644 --- a/content/shell/shell_content_client.h +++ b/content/shell/shell_content_client.h @@ -21,7 +21,7 @@ class ShellContentClient : public ContentClient { std::vector<PepperPluginInfo>* plugins) OVERRIDE; virtual bool CanSendWhileSwappedOut(const IPC::Message* msg) OVERRIDE; virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) OVERRIDE; - virtual std::string GetUserAgent(bool mimic_windows) const OVERRIDE; + virtual std::string GetUserAgent(bool* overriding) const OVERRIDE; virtual string16 GetLocalizedString(int message_id) const OVERRIDE; virtual base::StringPiece GetDataResource(int resource_id) const OVERRIDE; |