From 2c83864854272e5f6fa2ddec7d3f6f44c4ee1eb2 Mon Sep 17 00:00:00 2001 From: treib Date: Mon, 27 Jul 2015 03:19:17 -0700 Subject: [PATCH] Supervised User SafeSites: normalize URLs when sending search query. Before, we'd only normalize while checking the results, which only got us part of the way there. BUG=417722 Review URL: https://codereview.chromium.org/1254203002 Cr-Commit-Position: refs/heads/master@{#340444} --- .../experimental/supervised_user_async_url_checker.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/browser/supervised_user/experimental/supervised_user_async_url_checker.cc b/chrome/browser/supervised_user/experimental/supervised_user_async_url_checker.cc index 59e4ac8adffc..00417e96252d 100644 --- a/chrome/browser/supervised_user/experimental/supervised_user_async_url_checker.cc +++ b/chrome/browser/supervised_user/experimental/supervised_user_async_url_checker.cc @@ -65,8 +65,9 @@ GURL GetNormalizedURL(const GURL& url) { GURL BuildSearchURL(const std::string& api_key, const GURL& url, bool safe) { - // Strip the scheme, so that we'll match any scheme. - std::string query = net::EscapeQueryParamValue(url.GetContent(), true); + // Normalize the URL and strip the scheme. + std::string query = + net::EscapeQueryParamValue(GetNormalizedURL(url).GetContent(), true); std::string search_url = base::StringPrintf( kQueryFormat, api_key.c_str(), -- 2.11.4.GIT