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_USER_AGENT_USER_AGENT_UTIL_H_ |
6 #define WEBKIT_GLUE_USER_AGENT_H_ | 6 #define WEBKIT_USER_AGENT_USER_AGENT_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "webkit/user_agent/webkit_user_agent_export.h" |
11 | 12 |
12 namespace webkit_glue { | 13 namespace webkit_glue { |
13 | 14 |
14 // Builds a User-agent compatible string that describes the OS and CPU type. | 15 // Builds a User-agent compatible string that describes the OS and CPU type. |
15 std::string BuildOSCpuInfo(); | 16 WEBKIT_USER_AGENT_EXPORT std::string BuildOSCpuInfo(); |
16 | 17 |
17 // Returns the WebKit version, in the form "major.minor (branch@revision)". | 18 // Returns the WebKit version, in the form "major.minor (branch@revision)". |
18 std::string GetWebKitVersion(); | 19 WEBKIT_USER_AGENT_EXPORT std::string GetWebKitVersion(); |
19 | 20 |
20 // The following 2 functions return the major and minor webkit versions. | 21 // The following 2 functions return the major and minor webkit versions. |
21 int GetWebKitMajorVersion(); | 22 WEBKIT_USER_AGENT_EXPORT int GetWebKitMajorVersion(); |
22 int GetWebKitMinorVersion(); | 23 WEBKIT_USER_AGENT_EXPORT int GetWebKitMinorVersion(); |
23 | 24 |
24 // Helper function to generate a full user agent string from a short | 25 // Helper function to generate a full user agent string from a short |
25 // product name. | 26 // product name. |
26 std::string BuildUserAgentFromProduct(const std::string& product); | 27 WEBKIT_USER_AGENT_EXPORT std::string BuildUserAgentFromProduct( |
| 28 const std::string& product); |
27 | 29 |
28 // Builds a full user agent string given a string describing the OS and a | 30 // Builds a full user agent string given a string describing the OS and a |
29 // product name. | 31 // product name. |
30 std::string BuildUserAgentFromOSAndProduct(const std::string& os_info, | 32 WEBKIT_USER_AGENT_EXPORT std::string BuildUserAgentFromOSAndProduct( |
31 const std::string& product); | 33 const std::string& os_info, |
| 34 const std::string& product); |
32 | 35 |
33 } // namespace webkit_glue | 36 } // namespace webkit_glue |
34 | 37 |
35 #endif // WEBKIT_GLUE_USER_AGENT_H_ | 38 #endif // WEBKIT_USER_AGENT_USER_AGENT_UTIL_H_ |
OLD | NEW |