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

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: ready for commit 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
« no previous file with comments | « webkit/glue/user_agent.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 (%s)",
26 WEBKIT_VERSION_MINOR); 26 WEBKIT_VERSION_MAJOR,
27 WEBKIT_VERSION_MINOR,
28 WEBKIT_SVN_REVISION);
29 }
30
31 std::string GetWebKitRevision() {
32 return WEBKIT_SVN_REVISION;
27 } 33 }
28 34
29 std::string BuildOSCpuInfo() { 35 std::string BuildOSCpuInfo() {
30 std::string os_cpu; 36 std::string os_cpu;
31 37
32 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) 38 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
33 int32 os_major_version = 0; 39 int32 os_major_version = 0;
34 int32 os_minor_version = 0; 40 int32 os_minor_version = 0;
35 int32 os_bugfix_version = 0; 41 int32 os_bugfix_version = 0;
36 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, 42 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 kUserAgentLocale, 118 kUserAgentLocale,
113 WEBKIT_VERSION_MAJOR, 119 WEBKIT_VERSION_MAJOR,
114 WEBKIT_VERSION_MINOR, 120 WEBKIT_VERSION_MINOR,
115 product.c_str(), 121 product.c_str(),
116 WEBKIT_VERSION_MAJOR, 122 WEBKIT_VERSION_MAJOR,
117 WEBKIT_VERSION_MINOR); 123 WEBKIT_VERSION_MINOR);
118 } 124 }
119 125
120 } // namespace webkit_glue 126 } // namespace webkit_glue
121 127
OLDNEW
« no previous file with comments | « webkit/glue/user_agent.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698