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

Side by Side Diff: ios/web/public/user_agent.mm

Issue 558163003: Update the user agent used in iOS 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 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 "ios/web/public/user_agent.h" 5 #include "ios/web/public/user_agent.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include <sys/sysctl.h> 9 #include <sys/sysctl.h>
10 #include <string> 10 #include <string>
(...skipping 15 matching lines...) Expand all
26 int32 major_os_version; 26 int32 major_os_version;
27 int32 minor_os_version; 27 int32 minor_os_version;
28 UAVersions ua_versions; 28 UAVersions ua_versions;
29 }; 29 };
30 30
31 const UAVersions& GetUAVersionsForCurrentOS() { 31 const UAVersions& GetUAVersionsForCurrentOS() {
32 // The WebKit version can be extracted dynamically from UIWebView, but the 32 // The WebKit version can be extracted dynamically from UIWebView, but the
33 // Safari version can't be, so a lookup table is used instead (for both, since 33 // Safari version can't be, so a lookup table is used instead (for both, since
34 // the reported versions should stay in sync). 34 // the reported versions should stay in sync).
35 static const OSVersionMap version_map[] = { 35 static const OSVersionMap version_map[] = {
36 { 8, 0, { "600.1.4", "600.1.4" } },
36 { 7, 1, { "9537.53", "537.51.2" } }, 37 { 7, 1, { "9537.53", "537.51.2" } },
37 { 7, 0, { "9537.53", "537.51.1" } }, 38 { 7, 0, { "9537.53", "537.51.1" } },
38 // 6.1 has the same values as 6.0. 39 // 6.1 has the same values as 6.0.
39 { 6, 0, { "8536.25", "536.26" } }, 40 { 6, 0, { "8536.25", "536.26" } },
40 }; 41 };
41 42
42 int32 os_major_version = 0; 43 int32 os_major_version = 0;
43 int32 os_minor_version = 0; 44 int32 os_minor_version = 0;
44 int32 os_bugfix_version = 0; 45 int32 os_bugfix_version = 0;
45 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, 46 base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 BuildOSCpuInfo().c_str(), 122 BuildOSCpuInfo().c_str(),
122 ua_versions.webkit_version_string, 123 ua_versions.webkit_version_string,
123 product.c_str(), 124 product.c_str(),
124 kernel_version, 125 kernel_version,
125 ua_versions.safari_version_string); 126 ua_versions.safari_version_string);
126 127
127 return user_agent; 128 return user_agent;
128 } 129 }
129 130
130 } // namespace web 131 } // namespace web
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698