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

Unified Diff: components/search_provider_logos/google_logo_api.cc

Issue 599243002: Revert of Fix doodle verification URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 1c81bfef8a596ed2dc9fa1c2675297bc2ab0c275..9a855cbcef6ab63c6d7e6c4f40f45fe41b26e2b8 100644
--- a/components/search_provider_logos/google_logo_api.cc
+++ b/components/search_provider_logos/google_logo_api.cc
@@ -9,6 +9,7 @@
#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 {
@@ -18,22 +19,7 @@
GURL GoogleAppendFingerprintToLogoURL(const GURL& logo_url,
const std::string& 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
-
- // TODO(newt): Switch to using net::AppendQueryParameter once it no longer
- // escapes ":"
-
- 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);
+ return net::AppendQueryParameter(logo_url, "async", "es_dfp:" + fingerprint);
}
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