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

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

Issue 10827146: crbug.com/127841 - Request Tablet Site on CB with touch screen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed spurious newline Created 8 years, 3 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
« chrome/common/chrome_switches.cc ('K') | « webkit/glue/user_agent.h ('k') | no next file » | 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) 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
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
OLDNEW
« chrome/common/chrome_switches.cc ('K') | « webkit/glue/user_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698