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

Unified Diff: webkit/user_agent/user_agent_util.cc

Issue 10952025: [Android] Make OS version reporting in the UA string legacy-compatible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/user_agent/user_agent_util.cc
diff --git a/webkit/user_agent/user_agent_util.cc b/webkit/user_agent/user_agent_util.cc
index a30fa87a502688582642e077f9f8909070922204..44cb648b752eade06e64b4e72ebb2bfb1c750bbc 100644
--- a/webkit/user_agent/user_agent_util.cc
+++ b/webkit/user_agent/user_agent_util.cc
@@ -77,6 +77,12 @@ std::string BuildOSCpuInfo() {
#endif
#if defined(OS_ANDROID)
+ std::string android_version_str;
+ base::StringAppendF(
+ &android_version_str, "%d.%d", os_major_version, os_minor_version);
+ if (os_bugfix_version != 0)
+ base::StringAppendF(&android_version_str, ".%d", os_bugfix_version);
+
std::string android_info_str;
// Send information about the device.
@@ -118,10 +124,8 @@ std::string BuildOSCpuInfo() {
os_minor_version,
os_bugfix_version
#elif defined(OS_ANDROID)
- "Android %d.%d.%d%s",
- os_major_version,
- os_minor_version,
- os_bugfix_version,
+ "Android %s%s",
+ android_version_str.c_str(),
android_info_str.c_str()
#else
"%s %s",
« 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