OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_PUBLIC_COMMON_USER_AGENT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_USER_AGENT_H_ |
6 #define CONTENT_PUBLIC_COMMON_USER_AGENT_H_ | 6 #define CONTENT_PUBLIC_COMMON_USER_AGENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 // Returns the WebKit version, in the form "major.minor (branch@revision)". | 14 // Returns the WebKit version, in the form "major.minor (branch@revision)". |
15 CONTENT_EXPORT std::string GetWebKitVersion(); | 15 CONTENT_EXPORT std::string GetWebKitVersion(); |
16 | 16 |
17 // The following 2 functions return the major and minor webkit versions. | |
18 CONTENT_EXPORT int GetWebKitMajorVersion(); | |
19 CONTENT_EXPORT int GetWebKitMinorVersion(); | |
20 | |
21 CONTENT_EXPORT std::string GetWebKitRevision(); | 17 CONTENT_EXPORT std::string GetWebKitRevision(); |
22 | 18 |
23 // Builds a User-agent compatible string that describes the OS and CPU type. | 19 // Builds a User-agent compatible string that describes the OS and CPU type. |
24 CONTENT_EXPORT std::string BuildOSCpuInfo(); | 20 CONTENT_EXPORT std::string BuildOSCpuInfo(); |
25 | 21 |
26 // Helper function to generate a full user agent string from a short | 22 // Helper function to generate a full user agent string from a short |
27 // product name. | 23 // product name. |
28 CONTENT_EXPORT std::string BuildUserAgentFromProduct( | 24 CONTENT_EXPORT std::string BuildUserAgentFromProduct( |
29 const std::string& product); | 25 const std::string& product); |
30 | 26 |
31 // Helper function to generate a full user agent string given a short | 27 // Helper function to generate a full user agent string given a short |
32 // product name and some extra text to be added to the OS info. | 28 // product name and some extra text to be added to the OS info. |
33 CONTENT_EXPORT std::string BuildUserAgentFromProductAndExtraOSInfo( | 29 CONTENT_EXPORT std::string BuildUserAgentFromProductAndExtraOSInfo( |
34 const std::string& product, | 30 const std::string& product, |
35 const std::string& extra_os_info); | 31 const std::string& extra_os_info); |
36 | 32 |
37 // Builds a full user agent string given a string describing the OS and a | 33 // Builds a full user agent string given a string describing the OS and a |
38 // product name. | 34 // product name. |
39 CONTENT_EXPORT std::string BuildUserAgentFromOSAndProduct( | 35 CONTENT_EXPORT std::string BuildUserAgentFromOSAndProduct( |
40 const std::string& os_info, | 36 const std::string& os_info, |
41 const std::string& product); | 37 const std::string& product); |
42 | 38 |
43 } // namespace content | 39 } // namespace content |
44 | 40 |
45 #endif // CONTENT_PUBLIC_COMMON_USER_AGENT_H_ | 41 #endif // CONTENT_PUBLIC_COMMON_USER_AGENT_H_ |
OLD | NEW |