summaryrefslogtreecommitdiffstats
path: root/webkit/glue/user_agent.h
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 17:13:06 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 17:13:06 +0000
commit7c7b8150179a97ff76425a8c05ecfeaa4a42136a (patch)
treec55cb2613086110b6e1e0c0fdd03293d3e5aac73 /webkit/glue/user_agent.h
parent08ba16f7dade0fc671cf014d1754cfef07a1f530 (diff)
downloadchromium_src-7c7b8150179a97ff76425a8c05ecfeaa4a42136a.zip
chromium_src-7c7b8150179a97ff76425a8c05ecfeaa4a42136a.tar.gz
chromium_src-7c7b8150179a97ff76425a8c05ecfeaa4a42136a.tar.bz2
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/3214005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/user_agent.h')
-rw-r--r--webkit/glue/user_agent.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/webkit/glue/user_agent.h b/webkit/glue/user_agent.h
new file mode 100644
index 0000000..914c5e68
--- /dev/null
+++ b/webkit/glue/user_agent.h
@@ -0,0 +1,25 @@
+// 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();
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_GLUE_USER_AGENT_H_
+