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 #include "webkit/common/user_agent/user_agent_util.h" | 5 #include "webkit/common/user_agent/user_agent_util.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 |
(...skipping 17 matching lines...) Expand all Loading... |
28 WEBKIT_VERSION_MINOR, | 28 WEBKIT_VERSION_MINOR, |
29 WEBKIT_SVN_REVISION); | 29 WEBKIT_SVN_REVISION); |
30 } | 30 } |
31 | 31 |
32 std::string GetWebKitRevision() { | 32 std::string GetWebKitRevision() { |
33 return WEBKIT_SVN_REVISION; | 33 return WEBKIT_SVN_REVISION; |
34 } | 34 } |
35 | 35 |
36 #if defined(OS_ANDROID) | 36 #if defined(OS_ANDROID) |
37 std::string GetAndroidDeviceName() { | 37 std::string GetAndroidDeviceName() { |
38 std::string android_device_name = base::SysInfo::GetDeviceName(); | 38 return base::SysInfo::GetDeviceName(); |
39 #if defined(GOOGLE_TV) | |
40 android_device_name += " TV"; | |
41 #endif | |
42 return android_device_name; | |
43 } | 39 } |
44 #endif | 40 #endif |
45 | 41 |
46 std::string BuildOSCpuInfo() { | 42 std::string BuildOSCpuInfo() { |
47 std::string os_cpu; | 43 std::string os_cpu; |
48 | 44 |
49 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ | 45 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ |
50 defined(OS_ANDROID) | 46 defined(OS_ANDROID) |
51 int32 os_major_version = 0; | 47 int32 os_major_version = 0; |
52 int32 os_minor_version = 0; | 48 int32 os_minor_version = 0; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 os_info.c_str(), | 183 os_info.c_str(), |
188 WEBKIT_VERSION_MAJOR, | 184 WEBKIT_VERSION_MAJOR, |
189 WEBKIT_VERSION_MINOR, | 185 WEBKIT_VERSION_MINOR, |
190 product.c_str(), | 186 product.c_str(), |
191 WEBKIT_VERSION_MAJOR, | 187 WEBKIT_VERSION_MAJOR, |
192 WEBKIT_VERSION_MINOR); | 188 WEBKIT_VERSION_MINOR); |
193 return user_agent; | 189 return user_agent; |
194 } | 190 } |
195 | 191 |
196 } // namespace webkit_glue | 192 } // namespace webkit_glue |
OLD | NEW |