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" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "build/util/webkit_version.h" |
12 | 13 |
13 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 14 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
14 #include <sys/utsname.h> | 15 #include <sys/utsname.h> |
15 #endif | 16 #endif |
16 | 17 |
17 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
18 #include "base/win/windows_version.h" | 19 #include "base/win/windows_version.h" |
19 #endif | 20 #endif |
20 | 21 |
21 // Generated | |
22 #include "webkit_version.h" // NOLINT | |
23 | |
24 namespace content { | 22 namespace content { |
25 | 23 |
26 std::string GetWebKitVersion() { | 24 std::string GetWebKitVersion() { |
27 return base::StringPrintf("%d.%d (%s)", | 25 return base::StringPrintf("%d.%d (%s)", |
28 WEBKIT_VERSION_MAJOR, | 26 WEBKIT_VERSION_MAJOR, |
29 WEBKIT_VERSION_MINOR, | 27 WEBKIT_VERSION_MINOR, |
30 WEBKIT_SVN_REVISION); | 28 WEBKIT_SVN_REVISION); |
31 } | 29 } |
32 | 30 |
33 int GetWebKitMajorVersion() { | 31 int GetWebKitMajorVersion() { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 os_info.c_str(), | 194 os_info.c_str(), |
197 WEBKIT_VERSION_MAJOR, | 195 WEBKIT_VERSION_MAJOR, |
198 WEBKIT_VERSION_MINOR, | 196 WEBKIT_VERSION_MINOR, |
199 product.c_str(), | 197 product.c_str(), |
200 WEBKIT_VERSION_MAJOR, | 198 WEBKIT_VERSION_MAJOR, |
201 WEBKIT_VERSION_MINOR); | 199 WEBKIT_VERSION_MINOR); |
202 return user_agent; | 200 return user_agent; |
203 } | 201 } |
204 | 202 |
205 } // namespace content | 203 } // namespace content |
OLD | NEW |