diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-04 21:15:45 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-04 21:15:45 +0000 |
commit | a04b64ee7f3b2229cfb7482022e08bf5125fee30 (patch) | |
tree | b91d212a17788b83e6235a1774a383bc2ba10ecb | |
parent | 1caf7cd7536176b784138c2d5d60489b097480b2 (diff) | |
download | chromium_src-a04b64ee7f3b2229cfb7482022e08bf5125fee30.zip chromium_src-a04b64ee7f3b2229cfb7482022e08bf5125fee30.tar.gz chromium_src-a04b64ee7f3b2229cfb7482022e08bf5125fee30.tar.bz2 |
Update iOS user agent generation
- Removes obsolote iOS 5 handling
- Updates Safari version to match iOS 7 release
- Changes the OS generation code to make it clearer
BUG=None
Review URL: https://codereview.chromium.org/56153003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232799 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/common/user_agent/user_agent_util_ios.mm | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/webkit/common/user_agent/user_agent_util_ios.mm b/webkit/common/user_agent/user_agent_util_ios.mm index 231b844..6a42c51 100644 --- a/webkit/common/user_agent/user_agent_util_ios.mm +++ b/webkit/common/user_agent/user_agent_util_ios.mm @@ -33,12 +33,9 @@ const UAVersions& GetUAVersionsForCurrentOS() { // Safari version can't be, so a lookup table is used instead (for both, since // the reported versions should stay in sync). static const OSVersionMap version_map[] = { - // TODO(stuartmorgan): Update for 7.0 final if necessary. - { 7, 0, { "8536.25", "537.51.1" } }, + { 7, 0, { "9537.53", "537.51.1" } }, // 6.1 has the same values as 6.0. { 6, 0, { "8536.25", "536.26" } }, - // 5.1 has the same values as 5.0. - { 5, 0, { "7534.48.3", "534.46" } }, }; int32 os_major_version = 0; @@ -96,10 +93,9 @@ std::string BuildOSCpuInfo() { std::string os_cpu; base::StringAppendF( &os_cpu, - "%s;%s CPU %sOS %s like Mac OS X", + "%s; CPU %s %s like Mac OS X", platform.c_str(), - (os_major_version < 5) ? " U;" : "", // iOS < 5 has a "U;" in the UA. - (platform == "iPad") ? "" : "iPhone ", // iPad has an empty string here. + (platform == "iPad") ? "OS" : "iPhone OS", os_version.c_str()); return os_cpu; |