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 #include "content/public/common/user_agent.h" | 5 #include "content/public/common/user_agent.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 std::string GetWebKitVersion() { | 26 std::string GetWebKitVersion() { |
27 return base::StringPrintf("%d.%d (%s)", | 27 return base::StringPrintf("%d.%d (%s)", |
28 WEBKIT_VERSION_MAJOR, | 28 WEBKIT_VERSION_MAJOR, |
29 WEBKIT_VERSION_MINOR, | 29 WEBKIT_VERSION_MINOR, |
30 WEBKIT_SVN_REVISION); | 30 WEBKIT_SVN_REVISION); |
31 } | 31 } |
32 | 32 |
33 int GetWebKitMajorVersion() { | |
34 return WEBKIT_VERSION_MAJOR; | |
35 } | |
36 | |
37 int GetWebKitMinorVersion() { | |
38 return WEBKIT_VERSION_MINOR; | |
39 } | |
40 | |
41 std::string GetWebKitRevision() { | 33 std::string GetWebKitRevision() { |
42 return WEBKIT_SVN_REVISION; | 34 return WEBKIT_SVN_REVISION; |
43 } | 35 } |
44 | 36 |
45 std::string BuildOSCpuInfo() { | 37 std::string BuildOSCpuInfo() { |
46 std::string os_cpu; | 38 std::string os_cpu; |
47 | 39 |
48 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ | 40 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ |
49 defined(OS_ANDROID) | 41 defined(OS_ANDROID) |
50 int32_t os_major_version = 0; | 42 int32_t os_major_version = 0; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 os_info.c_str(), | 188 os_info.c_str(), |
197 WEBKIT_VERSION_MAJOR, | 189 WEBKIT_VERSION_MAJOR, |
198 WEBKIT_VERSION_MINOR, | 190 WEBKIT_VERSION_MINOR, |
199 product.c_str(), | 191 product.c_str(), |
200 WEBKIT_VERSION_MAJOR, | 192 WEBKIT_VERSION_MAJOR, |
201 WEBKIT_VERSION_MINOR); | 193 WEBKIT_VERSION_MINOR); |
202 return user_agent; | 194 return user_agent; |
203 } | 195 } |
204 | 196 |
205 } // namespace content | 197 } // namespace content |
OLD | NEW |