| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 return base::SysInfo::GetDeviceName(); | 30 return base::SysInfo::GetDeviceName(); |
| 31 } | 31 } |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 std::string GetWebKitVersion() { | 36 std::string GetWebKitVersion() { |
| 37 return base::StringPrintf("%d.%d (%s)", | 37 return base::StringPrintf("%d.%d (%s)", |
| 38 WEBKIT_VERSION_MAJOR, | 38 WEBKIT_VERSION_MAJOR, |
| 39 WEBKIT_VERSION_MINOR, | 39 WEBKIT_VERSION_MINOR, |
| 40 WEBKIT_SVN_REVISION); | 40 WEBKIT_SVN_REVISION |
| 41 // FIXME(tasak): after shpping OIPAN, remove ths following code. |
| 42 #if defined(ENABLE_OILPAN) && !defined(OFFICIAL_BUILD) |
| 43 "-OILPAN" |
| 44 #endif |
| 45 ); |
| 41 } | 46 } |
| 42 | 47 |
| 43 int GetWebKitMajorVersion() { | 48 int GetWebKitMajorVersion() { |
| 44 return WEBKIT_VERSION_MAJOR; | 49 return WEBKIT_VERSION_MAJOR; |
| 45 } | 50 } |
| 46 | 51 |
| 47 int GetWebKitMinorVersion() { | 52 int GetWebKitMinorVersion() { |
| 48 return WEBKIT_VERSION_MINOR; | 53 return WEBKIT_VERSION_MINOR; |
| 49 } | 54 } |
| 50 | 55 |
| 51 std::string GetWebKitRevision() { | 56 std::string GetWebKitRevision() { |
| 52 return WEBKIT_SVN_REVISION; | 57 return WEBKIT_SVN_REVISION |
| 58 // FIXME(tasak): after shpping OIPAN, remove ths following code. |
| 59 #if defined(ENABLE_OILPAN) && !defined(OFFICIAL_BUILD) |
| 60 "-OILPAN" |
| 61 #endif |
| 62 ; |
| 53 } | 63 } |
| 54 | 64 |
| 55 std::string BuildOSCpuInfo() { | 65 std::string BuildOSCpuInfo() { |
| 56 std::string os_cpu; | 66 std::string os_cpu; |
| 57 | 67 |
| 58 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ | 68 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ |
| 59 defined(OS_ANDROID) | 69 defined(OS_ANDROID) |
| 60 int32 os_major_version = 0; | 70 int32 os_major_version = 0; |
| 61 int32 os_minor_version = 0; | 71 int32 os_minor_version = 0; |
| 62 int32 os_bugfix_version = 0; | 72 int32 os_bugfix_version = 0; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 os_info.c_str(), | 198 os_info.c_str(), |
| 189 WEBKIT_VERSION_MAJOR, | 199 WEBKIT_VERSION_MAJOR, |
| 190 WEBKIT_VERSION_MINOR, | 200 WEBKIT_VERSION_MINOR, |
| 191 product.c_str(), | 201 product.c_str(), |
| 192 WEBKIT_VERSION_MAJOR, | 202 WEBKIT_VERSION_MAJOR, |
| 193 WEBKIT_VERSION_MINOR); | 203 WEBKIT_VERSION_MINOR); |
| 194 return user_agent; | 204 return user_agent; |
| 195 } | 205 } |
| 196 | 206 |
| 197 } // namespace content | 207 } // namespace content |
| OLD | NEW |