Chromium Code Reviews| Index: components/search_provider_logos/google_logo_api.cc |
| diff --git a/components/search_provider_logos/google_logo_api.cc b/components/search_provider_logos/google_logo_api.cc |
| index 9a855cbcef6ab63c6d7e6c4f40f45fe41b26e2b8..d8abc285dbecb8b17e245efabf2e7a5c1caab1fc 100644 |
| --- a/components/search_provider_logos/google_logo_api.cc |
| +++ b/components/search_provider_logos/google_logo_api.cc |
| @@ -9,7 +9,6 @@ |
| #include "base/memory/ref_counted_memory.h" |
| #include "base/strings/string_util.h" |
| #include "base/values.h" |
| -#include "net/base/url_util.h" |
| namespace search_provider_logos { |
| @@ -19,7 +18,19 @@ const char kResponsePreamble[] = ")]}'"; |
| GURL GoogleAppendFingerprintToLogoURL(const GURL& logo_url, |
| const std::string& fingerprint) { |
| - return net::AppendQueryParameter(logo_url, "async", "es_dfp:" + fingerprint); |
| + // Note: we can't just use net::AppendQueryParameter() because it escapes |
| + // ":" to "%3A", but the server requires the colon not to be escaped. |
| + // See: http://crbug.com/413845 |
|
mmenke
2014/09/24 19:48:58
nit: Could you add something like:
TODO(newt): S
newt (away)
2014/09/24 19:56:10
Done.
|
| + |
| + std::string query(logo_url.query()); |
| + if (!query.empty()) |
| + query += "&"; |
| + |
| + query += "async=es_dfp:"; |
| + query += fingerprint; |
| + GURL::Replacements replacements; |
| + replacements.SetQueryStr(query); |
| + return logo_url.ReplaceComponents(replacements); |
| } |
| scoped_ptr<EncodedLogo> GoogleParseLogoResponse( |