Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Side by Side Diff: webkit/glue/user_agent.cc

Issue 6354014: webkit: expose webkit branch and revision number in about pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/stringprintf.h"
13 #include "base/sys_info.h" 13 #include "base/sys_info.h"
14 14
15 // Generated 15 // Generated
16 #include "webkit_version.h" // NOLINT 16 #include "webkit_version.h" // NOLINT
17 17
18 namespace webkit_glue { 18 namespace webkit_glue {
19 19
20 // Forward declare GetProductVersionInfo. This is implemented in 20 // Forward declare GetProductVersionInfo. This is implemented in
21 // renderer_glue.cc as part of the renderer lib. 21 // renderer_glue.cc as part of the renderer lib.
22 std::string GetProductVersion(); 22 std::string GetProductVersion();
23 23
24 std::string GetWebKitVersion() { 24 std::string GetWebKitVersion() {
25 return base::StringPrintf("%d.%d", WEBKIT_VERSION_MAJOR, 25 return base::StringPrintf("%d.%d", WEBKIT_VERSION_MAJOR,
26 WEBKIT_VERSION_MINOR); 26 WEBKIT_VERSION_MINOR);
27 } 27 }
28 28
29 std::string GetWebKitRevision() {
30 return WEBKIT_SVN_REVISION;
31 }
32
29 std::string BuildOSCpuInfo() { 33 std::string BuildOSCpuInfo() {
30 std::string os_cpu; 34 std::string os_cpu;
31 35
32 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) 36 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
33 int32 os_major_version = 0; 37 int32 os_major_version = 0;
34 int32 os_minor_version = 0; 38 int32 os_minor_version = 0;
35 int32 os_bugfix_version = 0; 39 int32 os_bugfix_version = 0;
36 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, 40 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
37 &os_minor_version, 41 &os_minor_version,
38 &os_bugfix_version); 42 &os_bugfix_version);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 kUserAgentLocale, 116 kUserAgentLocale,
113 WEBKIT_VERSION_MAJOR, 117 WEBKIT_VERSION_MAJOR,
114 WEBKIT_VERSION_MINOR, 118 WEBKIT_VERSION_MINOR,
115 product.c_str(), 119 product.c_str(),
116 WEBKIT_VERSION_MAJOR, 120 WEBKIT_VERSION_MAJOR,
117 WEBKIT_VERSION_MINOR); 121 WEBKIT_VERSION_MINOR);
118 } 122 }
119 123
120 } // namespace webkit_glue 124 } // namespace webkit_glue
121 125
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698