Merge lp:~brandonsnider/chromium-browser/chromium-browser.beta.daily into lp:~chromium-daily/chromium-browser/chromium-browser.beta.daily

Proposed by Brandon Snider
Status: Needs review
Proposed branch: lp:~brandonsnider/chromium-browser/chromium-browser.beta.daily
Merge into: lp:~chromium-daily/chromium-browser/chromium-browser.beta.daily
Diff against target: 49 lines (+8/-17)
1 file modified
debian/patches/chromium_useragent.patch.in (+8/-17)
To merge this branch: bzr merge lp:~brandonsnider/chromium-browser/chromium-browser.beta.daily
Reviewer Review Type Date Requested Status
Chromium Builds Pending
Review via email: mp+85770@code.launchpad.net

Description of the change

fixed chromium-useragent.patch.in

To post a comment you must log in.
Revision history for this message
Jes Slow (cluelesscoder) wrote :

This seems a bit stale. Can it be closed?

Unmerged revisions

533. By Brandon Snider

fixed chromium-useragent.patch.in

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/patches/chromium_useragent.patch.in'
--- debian/patches/chromium_useragent.patch.in 2011-08-11 19:22:20 +0000
+++ debian/patches/chromium_useragent.patch.in 2011-12-15 00:40:29 +0000
@@ -6,28 +6,24 @@
6===================================================================6===================================================================
7--- src.orig/webkit/glue/user_agent.cc7--- src.orig/webkit/glue/user_agent.cc
8+++ src/webkit/glue/user_agent.cc8+++ src/webkit/glue/user_agent.cc
9@@ -127,25 +127,32 @@9@@ -129,16 +129,23 @@ std::string BuildUserAgentFromProduct(co
10 #endif10
11
12 std::string user_agent;
13
14 // Replace Safari's Version/X string with the product name/version passed in.
15 // This is done to expose our product name in a manner that is maximally11 // This is done to expose our product name in a manner that is maximally
16 // compatible with Safari, we hope!!12 // compatible with Safari, we hope!!
17
18+ // We want to also add Chromium13+ // 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+14+
15+std::string realproduct = product.c_str();
16+size_t pos;
17+if ((pos = realproduct.find("/")) != std::string::npos)
18+ realproduct.replace(0, pos, "Chromium");
19
24 // Derived from Safari's UA string.20 // Derived from Safari's UA string.
25 base::StringAppendF(21 base::StringAppendF(
26 &user_agent,22 &user_agent,
27 "Mozilla/5.0 (%s%s) AppleWebKit/%d.%d"23 "Mozilla/5.0 (%s%s) AppleWebKit/%d.%d"
28- " (KHTML, like Gecko) %s Safari/%d.%d",24- " (KHTML, like Gecko) %s Safari/%d.%d",
29+ " (KHTML, like Gecko) @BUILD_DIST_NAME@/@BUILD_DIST_VERSION@ %s %s Safari/%d.%d",25+ " (KHTML, like Gecko) @BUILD_DIST_NAME@/@BUILD_DIST_VERSION@ %s %s Safari/%d.%d",
30 mimic_windows ? "Windows " : kUserAgentPlatform,26 kUserAgentPlatform,
31 webkit_glue::BuildOSCpuInfo().c_str(),27 webkit_glue::BuildOSCpuInfo().c_str(),
32 WEBKIT_VERSION_MAJOR,28 WEBKIT_VERSION_MAJOR,
33 WEBKIT_VERSION_MINOR,29 WEBKIT_VERSION_MINOR,
@@ -35,8 +31,3 @@
35 product.c_str(),31 product.c_str(),
36 WEBKIT_VERSION_MAJOR,32 WEBKIT_VERSION_MAJOR,
37 WEBKIT_VERSION_MINOR);33 WEBKIT_VERSION_MINOR);
38 return user_agent;
39 }
40
41 } // namespace webkit_glue
42

Subscribers

People subscribed via source and target branches

to all changes: