]> git.pld-linux.org Git - packages/chromium-browser.git/blob - chromium_useragent.patch.in
- add chromium and pld to useragent (patch from unbuntu)
[packages/chromium-browser.git] / chromium_useragent.patch.in
1 ---
2  webkit/glue/user_agent.cc |    9 ++++++++-
3  1 file changed, 8 insertions(+), 1 deletion(-)
4
5 Index: src/webkit/glue/user_agent.cc
6 ===================================================================
7 --- src.orig/webkit/glue/user_agent.cc
8 +++ src/webkit/glue/user_agent.cc
9 @@ -97,24 +97,31 @@
10        "?";
11  #endif
12  
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();
17  
18 +  // We want to also add Chromium
19 +  std::string realproduct = product.c_str();
20 +  size_t pos;
21 +  if ((pos = realproduct.find("/")) != std::string::npos)
22 +      realproduct.replace(0, pos, "Chromium");
23 +
24    // Derived from Safari's UA string.
25    base::StringAppendF(
26        result,
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(),
32        WEBKIT_VERSION_MAJOR,
33        WEBKIT_VERSION_MINOR,
34 +      realproduct.c_str(),
35        product.c_str(),
36        WEBKIT_VERSION_MAJOR,
37        WEBKIT_VERSION_MINOR);
38  }
39  
40  }  // namespace webkit_glue
41  
This page took 0.028354 seconds and 4 git commands to generate.