2 webkit/glue/user_agent.cc | 9 ++++++++-
3 1 file changed, 8 insertions(+), 1 deletion(-)
5 Index: src/webkit/glue/user_agent.cc
6 ===================================================================
7 --- src.orig/webkit/glue/user_agent.cc
8 +++ src/webkit/glue/user_agent.cc
13 // Get the product name and version, and replace Safari's Version/X string
14 // with it. This is done to expose our product name in a manner that is
15 // maximally compatible with Safari, we hope!!
16 std::string product = GetProductVersion();
18 + // We want to also add Chromium
19 + std::string realproduct = product.c_str();
21 + if ((pos = realproduct.find("/")) != std::string::npos)
22 + realproduct.replace(0, pos, "Chromium");
24 // Derived from Safari's UA string.
27 "Mozilla/5.0 (%s; %s) AppleWebKit/%d.%d"
28 - " (KHTML, like Gecko) %s Safari/%d.%d",
29 + " (KHTML, like Gecko) @BUILD_DIST_NAME@/@BUILD_DIST_VERSION@ %s %s Safari/%d.%d",
30 mimic_windows ? "Windows" : kUserAgentPlatform,
31 ((mimic_windows ? "Windows " : "") + BuildOSCpuInfo()).c_str(),
34 + realproduct.c_str(),
37 WEBKIT_VERSION_MINOR);
40 } // namespace webkit_glue