OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GLUE_USER_AGENT_H_ | 5 #ifndef WEBKIT_GLUE_USER_AGENT_H_ |
6 #define WEBKIT_GLUE_USER_AGENT_H_ | 6 #define WEBKIT_GLUE_USER_AGENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 | 11 |
12 namespace webkit_glue { | 12 namespace webkit_glue { |
13 | 13 |
14 // Builds a User-agent compatible string that describes the OS and CPU type. | 14 // Builds a User-agent compatible string that describes the OS and CPU type. |
15 std::string BuildOSCpuInfo(); | 15 std::string BuildOSCpuInfo(); |
16 | 16 |
17 // Builds a User-agent compatible string that describes the Android build being | |
18 // used. If no information is available, returns a spoofed string pointing to | |
19 // the latest publicly available version of Android. | |
20 std::string BuildOSCpuInfoForAndroid(); | |
jamesr
2012/08/15 21:07:50
why is this publicly exposed as a separate entry p
| |
21 | |
17 // Returns the WebKit version, in the form "major.minor (branch@revision)". | 22 // Returns the WebKit version, in the form "major.minor (branch@revision)". |
18 std::string GetWebKitVersion(); | 23 std::string GetWebKitVersion(); |
19 | 24 |
20 // The following 2 functions return the major and minor webkit versions. | 25 // The following 2 functions return the major and minor webkit versions. |
21 int GetWebKitMajorVersion(); | 26 int GetWebKitMajorVersion(); |
22 int GetWebKitMinorVersion(); | 27 int GetWebKitMinorVersion(); |
23 | 28 |
24 #if defined(OS_ANDROID) | |
25 // Sets the OS component of the user agent (e.g. "4.0.4; Galaxy Nexus | |
26 // BUILD/IMM76K") | |
27 // TODO(yfriedman): Remove this ASAP (http://crbug.com/131312) | |
28 void SetUserAgentOSInfo(const std::string& os_info); | |
29 #endif | |
30 | |
31 // Helper function to generate a full user agent string from a short | 29 // Helper function to generate a full user agent string from a short |
32 // product name. | 30 // product name. |
33 std::string BuildUserAgentFromProduct(const std::string& product); | 31 std::string BuildUserAgentFromProduct(const std::string& product); |
34 | 32 |
35 } // namespace webkit_glue | 33 } // namespace webkit_glue |
36 | 34 |
37 #endif // WEBKIT_GLUE_USER_AGENT_H_ | 35 #endif // WEBKIT_GLUE_USER_AGENT_H_ |
OLD | NEW |