diff options
author | jiayl <jiayl@chromium.org> | 2014-09-24 15:51:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-24 22:51:21 +0000 |
commit | 6101b6321585a402ffc7c45dbb4fc61bc36f0051 (patch) | |
tree | 7c0034eb8aa8e93b6b9acf51c52895977e3181d0 /components/search_provider_logos/google_logo_api.cc | |
parent | d8cbcb4ebec718274aa5807ccfb785fb7cab275c (diff) | |
download | chromium_src-6101b6321585a402ffc7c45dbb4fc61bc36f0051.zip chromium_src-6101b6321585a402ffc7c45dbb4fc61bc36f0051.tar.gz chromium_src-6101b6321585a402ffc7c45dbb4fc61bc36f0051.tar.bz2 |
Revert of Fix doodle verification URL. (patchset #3 id:40001 of https://codereview.chromium.org/587943003/)
Reason for revert:
Caused test failure:
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%283%29/builds/7944
Original issue's description:
> Fix doodle verification URL.
>
> When verifying that the cached doodle is still valid, we load the doodle
> URL and append the query param "async=es_dfp:<fingerprint>". Previously,
> the ":" was being escape to "%3A", causing the server to respond with a
> 400 error. This mollifies the server by keeping the colon unescaped.
>
> BUG=413845
>
> Committed: https://crrev.com/673cc76103079eaada968c537c6605dbaf8d909c
> Cr-Commit-Position: refs/heads/master@{#296512}
TBR=justincohen@chromium.org,rsleevi@chromium.org,mmenke@chromium.org,newt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=413845
Review URL: https://codereview.chromium.org/599243002
Cr-Commit-Position: refs/heads/master@{#296546}
Diffstat (limited to 'components/search_provider_logos/google_logo_api.cc')
-rw-r--r-- | components/search_provider_logos/google_logo_api.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/components/search_provider_logos/google_logo_api.cc b/components/search_provider_logos/google_logo_api.cc index 1c81bfe..9a855cb 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 @@ const char kResponsePreamble[] = ")]}'"; 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( |