]> git.pld-linux.org Git - packages/chromium-browser.git/blob - chromium_useragent.patch.in
up to 25.0.1364.97
[packages/chromium-browser.git] / chromium_useragent.patch.in
1 --- chromium-browser-23.0.1271.60/src/webkit/user_agent/user_agent_util.cc~     2012-10-30 21:01:17.000000000 +0200
2 +++ chromium-browser-23.0.1271.60/src/webkit/user_agent/user_agent_util.cc      2012-11-04 17:00:57.206490293 +0200
3 @@ -167,12 +167,20 @@
4    // This is done to expose our product name in a manner that is maximally
5    // compatible with Safari, we hope!!
6    std::string user_agent;
7 +
8 +  // We want to also add Chromium
9 +  std::string realproduct = product.c_str();
10 +  size_t pos;
11 +  if ((pos = realproduct.find("/")) != std::string::npos)
12 +      realproduct.replace(0, pos, "Chromium");
13 +
14    base::StringAppendF(
15        &user_agent,
16 -      "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d",
17 +      "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) @BUILD_DIST_NAME@/@BUILD_DIST_VERSION@ %s %s Safari/%d.%d",
18        os_info.c_str(),
19        WEBKIT_VERSION_MAJOR,
20        WEBKIT_VERSION_MINOR,
21 +      realproduct.c_str(),
22        product.c_str(),
23        WEBKIT_VERSION_MAJOR,
24        WEBKIT_VERSION_MINOR);
This page took 0.061993 seconds and 4 git commands to generate.