diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 19:28:25 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 19:28:25 +0000 |
commit | 420286748888437c755272ffe98fd27a16099194 (patch) | |
tree | 45431e2ca0d52bf46c57f305d1d69660db29e9a1 /webkit/glue/user_agent.h | |
parent | 8ec81aa69cbd7595508448afe9a0b2cee6e0d321 (diff) | |
download | chromium_src-420286748888437c755272ffe98fd27a16099194.zip chromium_src-420286748888437c755272ffe98fd27a16099194.tar.gz chromium_src-420286748888437c755272ffe98fd27a16099194.tar.bz2 |
Second attempt at landing http://codereview.chromium.org/3214005
Factoring BuildUserAgent out to a separate lib for GCF can use it.
TEST=There should be no functional change. If anything breaks it should be the build.
BUG=50788
Review URL: http://codereview.chromium.org/3225003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/user_agent.h')
-rw-r--r-- | webkit/glue/user_agent.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/webkit/glue/user_agent.h b/webkit/glue/user_agent.h new file mode 100644 index 0000000..3d1f788 --- /dev/null +++ b/webkit/glue/user_agent.h @@ -0,0 +1,28 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_GLUE_USER_AGENT_H_ +#define WEBKIT_GLUE_USER_AGENT_H_ + +#include <string> + +#include "base/basictypes.h" + +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 (major.minor). +std::string GetWebKitVersion(); + +} // namespace webkit_glue + +#endif // WEBKIT_GLUE_USER_AGENT_H_ + |