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 #if defined(ENABLE_OILPAN) && ENABLE_OILPAN && !defined(OFFICIAL_BUILD) | |
brettw
2015/02/07 00:17:17
You should do either "defined" style or check the
tasak
2015/02/10 05:51:24
Because we don't need to add the "OILPAN" string t
brettw
2015/02/10 22:51:38
But shouldn'e the ENABLE_OILPAN flag always be set
| |
42 "-OILPAN" | |
43 #endif | |
44 ); | |
41 } | 45 } |
42 | 46 |
43 int GetWebKitMajorVersion() { | 47 int GetWebKitMajorVersion() { |
44 return WEBKIT_VERSION_MAJOR; | 48 return WEBKIT_VERSION_MAJOR; |
45 } | 49 } |
46 | 50 |
47 int GetWebKitMinorVersion() { | 51 int GetWebKitMinorVersion() { |
48 return WEBKIT_VERSION_MINOR; | 52 return WEBKIT_VERSION_MINOR; |
49 } | 53 } |
50 | 54 |
51 std::string GetWebKitRevision() { | 55 std::string GetWebKitRevision() { |
52 return WEBKIT_SVN_REVISION; | 56 return WEBKIT_SVN_REVISION |
57 #if defined(ENABLE_OILPAN) && ENABLE_OILPAN && !defined(OFFICIAL_BUILD) | |
58 "-OILPAN" | |
59 #endif | |
60 ; | |
53 } | 61 } |
54 | 62 |
55 std::string BuildOSCpuInfo() { | 63 std::string BuildOSCpuInfo() { |
56 std::string os_cpu; | 64 std::string os_cpu; |
57 | 65 |
58 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ | 66 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\ |
59 defined(OS_ANDROID) | 67 defined(OS_ANDROID) |
60 int32 os_major_version = 0; | 68 int32 os_major_version = 0; |
61 int32 os_minor_version = 0; | 69 int32 os_minor_version = 0; |
62 int32 os_bugfix_version = 0; | 70 int32 os_bugfix_version = 0; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 os_info.c_str(), | 196 os_info.c_str(), |
189 WEBKIT_VERSION_MAJOR, | 197 WEBKIT_VERSION_MAJOR, |
190 WEBKIT_VERSION_MINOR, | 198 WEBKIT_VERSION_MINOR, |
191 product.c_str(), | 199 product.c_str(), |
192 WEBKIT_VERSION_MAJOR, | 200 WEBKIT_VERSION_MAJOR, |
193 WEBKIT_VERSION_MINOR); | 201 WEBKIT_VERSION_MINOR); |
194 return user_agent; | 202 return user_agent; |
195 } | 203 } |
196 | 204 |
197 } // namespace content | 205 } // namespace content |
OLD | NEW |