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/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/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
14 #include "base/sys_info.h" | 14 #include "base/sys_info.h" |
15 | 15 |
16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
17 #include "base/win/windows_version.h" | 17 #include "base/win/windows_version.h" |
18 #endif | 18 #endif |
19 | 19 |
20 // Generated | 20 // Generated |
21 #include "webkit_version.h" // NOLINT | 21 #include "webkit_version.h" // NOLINT |
22 | 22 |
23 namespace { | |
24 const char kOsOverrideForTabletSite[] = "Linux; Android"; | |
gone
2012/09/06 18:08:32
Change this to "Linux; Android 4.0.3" as per the e
sschmitz
2012/09/06 18:52:45
Ok, thanks for your dilligence on this.
Done.
| |
25 } | |
26 | |
23 namespace webkit_glue { | 27 namespace webkit_glue { |
24 | 28 |
25 std::string GetWebKitVersion() { | 29 std::string GetWebKitVersion() { |
26 return base::StringPrintf("%d.%d (%s)", | 30 return base::StringPrintf("%d.%d (%s)", |
27 WEBKIT_VERSION_MAJOR, | 31 WEBKIT_VERSION_MAJOR, |
28 WEBKIT_VERSION_MINOR, | 32 WEBKIT_VERSION_MINOR, |
29 WEBKIT_SVN_REVISION); | 33 WEBKIT_SVN_REVISION); |
30 } | 34 } |
31 | 35 |
32 std::string GetWebKitRevision() { | 36 std::string GetWebKitRevision() { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d", | 176 "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d", |
173 os_info.c_str(), | 177 os_info.c_str(), |
174 WEBKIT_VERSION_MAJOR, | 178 WEBKIT_VERSION_MAJOR, |
175 WEBKIT_VERSION_MINOR, | 179 WEBKIT_VERSION_MINOR, |
176 product.c_str(), | 180 product.c_str(), |
177 WEBKIT_VERSION_MAJOR, | 181 WEBKIT_VERSION_MAJOR, |
178 WEBKIT_VERSION_MINOR); | 182 WEBKIT_VERSION_MINOR); |
179 return user_agent; | 183 return user_agent; |
180 } | 184 } |
181 | 185 |
186 std::string BuildUserAgentOverrideForTabletSiteFromProduct( | |
187 const std::string& product) | |
188 { | |
gone
2012/09/06 18:08:32
Brace needs to go on the previous line.
sschmitz
2012/09/06 18:52:45
Old habits die hard ;-)
Done
| |
189 return BuildUserAgentFromOSAndProduct(kOsOverrideForTabletSite, | |
190 product); | |
191 } | |
192 | |
182 } // namespace webkit_glue | 193 } // namespace webkit_glue |
OLD | NEW |