| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/user_agent.h" | 5 #include "webkit/glue/user_agent.h" |
| 6 | 6 |
| 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 8 #include <sys/utsname.h> | 8 #include <sys/utsname.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/stringprintf.h" |
| 12 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
| 13 | 14 |
| 14 // Generated | 15 // Generated |
| 15 #include "webkit_version.h" // NOLINT | 16 #include "webkit_version.h" // NOLINT |
| 16 | 17 |
| 17 namespace webkit_glue { | 18 namespace webkit_glue { |
| 18 | 19 |
| 19 // Forward declare GetProductVersionInfo. This is implemented in | 20 // Forward declare GetProductVersionInfo. This is implemented in |
| 20 // renderer_glue.cc as part of the renderer lib. | 21 // renderer_glue.cc as part of the renderer lib. |
| 21 std::string GetProductVersion(); | 22 std::string GetProductVersion(); |
| 22 | 23 |
| 23 std::string GetWebKitVersion() { | 24 std::string GetWebKitVersion() { |
| 24 return StringPrintf("%d.%d", WEBKIT_VERSION_MAJOR, WEBKIT_VERSION_MINOR); | 25 return base::StringPrintf("%d.%d", WEBKIT_VERSION_MAJOR, |
| 26 WEBKIT_VERSION_MINOR); |
| 25 } | 27 } |
| 26 | 28 |
| 27 std::string BuildOSCpuInfo() { | 29 std::string BuildOSCpuInfo() { |
| 28 std::string os_cpu; | 30 std::string os_cpu; |
| 29 | 31 |
| 30 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) | 32 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| 31 int32 os_major_version = 0; | 33 int32 os_major_version = 0; |
| 32 int32 os_minor_version = 0; | 34 int32 os_minor_version = 0; |
| 33 int32 os_bugfix_version = 0; | 35 int32 os_bugfix_version = 0; |
| 34 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, | 36 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 kUserAgentLocale, | 112 kUserAgentLocale, |
| 111 WEBKIT_VERSION_MAJOR, | 113 WEBKIT_VERSION_MAJOR, |
| 112 WEBKIT_VERSION_MINOR, | 114 WEBKIT_VERSION_MINOR, |
| 113 product.c_str(), | 115 product.c_str(), |
| 114 WEBKIT_VERSION_MAJOR, | 116 WEBKIT_VERSION_MAJOR, |
| 115 WEBKIT_VERSION_MINOR); | 117 WEBKIT_VERSION_MINOR); |
| 116 } | 118 } |
| 117 | 119 |
| 118 } // namespace webkit_glue | 120 } // namespace webkit_glue |
| 119 | 121 |
| OLD | NEW |