Chromium Code Reviews| Index: webkit/glue/user_agent.cc |
| =================================================================== |
| --- webkit/glue/user_agent.cc (revision 75955) |
| +++ webkit/glue/user_agent.cc (working copy) |
| @@ -71,7 +71,7 @@ |
| os_bugfix_version |
| #elif defined(OS_CHROMEOS) |
| "CrOS %s %d.%d.%d", |
| - cputype.c_str(), // e.g. i686 |
| + cputype.c_str(), // e.g. i686 |
| os_major_version, |
| os_minor_version, |
| os_bugfix_version |
| @@ -88,13 +88,13 @@ |
| void BuildUserAgent(bool mimic_windows, std::string* result) { |
| const char kUserAgentPlatform[] = |
| #if defined(OS_WIN) |
| - "Windows"; |
| + ""; |
| #elif defined(OS_MACOSX) |
| - "Macintosh"; |
| + "Macintosh; "; |
| #elif defined(USE_X11) |
| - "X11"; // strange, but that's what Firefox uses |
| + "X11; "; // strange, but that's what Firefox uses |
| #else |
| - "?"; |
| + "Unknown; "; |
| #endif |
| // Get the product name and version, and replace Safari's Version/X string |
| @@ -105,10 +105,10 @@ |
| // Derived from Safari's UA string. |
| base::StringAppendF( |
| result, |
| - "Mozilla/5.0 (%s; %s) AppleWebKit/%d.%d" |
| + "Mozilla/5.0 (%s%s) AppleWebKit/%d.%d" |
| " (KHTML, like Gecko) %s Safari/%d.%d", |
| - mimic_windows ? "Windows" : kUserAgentPlatform, |
| - ((mimic_windows ? "Windows " : "") + BuildOSCpuInfo()).c_str(), |
| + mimic_windows ? "Windows " : kUserAgentPlatform, |
|
darin (slow to review)
2011/02/25 09:44:08
is this doing the right thing when mimic_windows i
Peter Kasting
2011/02/25 17:37:32
It produces a string that transforms the new Windo
|
| + BuildOSCpuInfo().c_str(), |
| WEBKIT_VERSION_MAJOR, |
| WEBKIT_VERSION_MINOR, |
| product.c_str(), |