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

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

Issue 2795273002: Update web view user agent for iOS 10.3. (Closed)
Patch Set: Created 3 years, 8 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
« 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 <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 27 matching lines...) Expand all
38 int32_t major_os_version; 38 int32_t major_os_version;
39 int32_t minor_os_version; 39 int32_t minor_os_version;
40 UAVersions ua_versions; 40 UAVersions ua_versions;
41 }; 41 };
42 42
43 const UAVersions& GetUAVersionsForCurrentOS() { 43 const UAVersions& GetUAVersionsForCurrentOS() {
44 // The WebKit version can be extracted dynamically from UIWebView, but the 44 // The WebKit version can be extracted dynamically from UIWebView, but the
45 // Safari version can't be, so a lookup table is used instead (for both, since 45 // Safari version can't be, so a lookup table is used instead (for both, since
46 // the reported versions should stay in sync). 46 // the reported versions should stay in sync).
47 static const OSVersionMap version_map[] = { 47 static const OSVersionMap version_map[] = {
48 {10, 3, {"602.1", "603.1.30"}},
48 {10, 0, {"602.1", "602.1.50"}}, 49 {10, 0, {"602.1", "602.1.50"}},
49 {9, 0, {"601.1.46", "601.1"}}, 50 {9, 0, {"601.1.46", "601.1"}},
50 {8, 0, {"600.1.4", "600.1.4"}}, 51 {8, 0, {"600.1.4", "600.1.4"}},
51 {7, 1, {"9537.53", "537.51.2"}}, 52 {7, 1, {"9537.53", "537.51.2"}},
52 {7, 0, {"9537.53", "537.51.1"}}, 53 {7, 0, {"9537.53", "537.51.1"}},
53 }; 54 };
54 55
55 int32_t os_major_version = 0; 56 int32_t os_major_version = 0;
56 int32_t os_minor_version = 0; 57 int32_t os_minor_version = 0;
57 int32_t os_bugfix_version = 0; 58 int32_t os_bugfix_version = 0;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 BuildOSCpuInfo().c_str(), 156 BuildOSCpuInfo().c_str(),
156 ua_versions.webkit_version_string, 157 ua_versions.webkit_version_string,
157 product.c_str(), 158 product.c_str(),
158 kernel_version, 159 kernel_version,
159 ua_versions.safari_version_string); 160 ua_versions.safari_version_string);
160 161
161 return user_agent; 162 return user_agent;
162 } 163 }
163 164
164 } // namespace web 165 } // 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