Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: components/search_provider_logos/google_logo_api.cc

Issue 587943003: Fix doodle verification URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated test Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/search_provider_logos/logo_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | components/search_provider_logos/logo_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698