diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-16 22:35:50 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-16 22:35:50 +0000 |
commit | d7196e3474c92f1e85c32f98ad564a32604fa535 (patch) | |
tree | ac137140b97ff1af774775e80e0708c15fa28f6a /webkit/glue/user_agent.h | |
parent | a65ed542245bbe6089590d06507892a704fb08f0 (diff) | |
download | chromium_src-d7196e3474c92f1e85c32f98ad564a32604fa535.zip chromium_src-d7196e3474c92f1e85c32f98ad564a32604fa535.tar.gz chromium_src-d7196e3474c92f1e85c32f98ad564a32604fa535.tar.bz2 |
Removed the GetProductVersion function from webkit_glue and replace it with the BuildUserAgent function.
The BuildUserAgent function has been deleted from user_agent.cc. The implementation of this function
in content\renderer_glue.cc calls the GetUserAgent API in ContentClient which is implemented by the embedder (Chrome).
Added implementations of the BuildUserAgent function for test_shell and DumpRenderTree. To build the user agent
string we need the webkit major and minor versions. Added getters for them in the webkit_glue namespace in the
user_agent.h/.cc files.
This helps reduce the implicit dependency of content on chrome.
BUG=82454
Review URL: http://codereview.chromium.org/7166004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/user_agent.h')
-rw-r--r-- | webkit/glue/user_agent.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/webkit/glue/user_agent.h b/webkit/glue/user_agent.h index 62c8324..583eef0 100644 --- a/webkit/glue/user_agent.h +++ b/webkit/glue/user_agent.h @@ -11,17 +11,20 @@ namespace webkit_glue { -// Construct the User-Agent header, filling in |result|. -// The other parameters are workarounds for broken websites: -// - If mimic_windows is true, produce a fake Windows Chrome string. -void BuildUserAgent(bool mimic_windows, std::string* result); - // Builds a User-agent compatible string that describes the OS and CPU type. std::string BuildOSCpuInfo(); // Returns the WebKit version, in the form "major.minor (branch@revision)". std::string GetWebKitVersion(); +// The following 2 functions return the major and minor webkit versions. +int GetWebKitMajorVersion(); +int GetWebKitMinorVersion(); + +// Helper function to generate the user agent. +// - If mimic_windows is true, produce a fake Windows Chrome string.. +std::string BuildUserAgentHelper(bool mimic_windows, + const std::string& product); } // namespace webkit_glue #endif // WEBKIT_GLUE_USER_AGENT_H_ |