From 83c7264800194b0d9ffdce49c57a3fdd5cf6a1a0 Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Wed, 10 Sep 2008 06:36:34 +0000 Subject: Don't send queries when URL is like: - starts with http:// or https:// and includes username (e.g. http://me@test.com/) - starts with http:// or https:// and includes query (e.g. http://test.com/?q=x) - starts with https:// and includes path component (e.g. https://test.com/path) so as not to leak user data to the suggest server. Patch by takayoshi.kochi@gmail.com BUG=1647 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1978 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'chrome/browser/autocomplete/autocomplete.cc') diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc index 6e7dc97..42b6d81 100644 --- a/chrome/browser/autocomplete/autocomplete.cc +++ b/chrome/browser/autocomplete/autocomplete.cc @@ -39,8 +39,7 @@ AutocompleteInput::AutocompleteInput(const std::wstring& text, if (TrimWhitespace(text, TRIM_ALL, &text_) & TRIM_TRAILING) prevent_inline_autocomplete_ = true; - url_parse::Parsed parts; - type_ = Parse(text_, desired_tld, &parts, &scheme_); + type_ = Parse(text_, desired_tld, &parts_, &scheme_); if (type_ == INVALID) return; @@ -220,6 +219,7 @@ bool AutocompleteInput::Equals(const AutocompleteInput& other) const { void AutocompleteInput::Clear() { text_.clear(); type_ = INVALID; + parts_ = url_parse::Parsed(); scheme_.clear(); desired_tld_.clear(); prevent_inline_autocomplete_ = false; @@ -743,4 +743,3 @@ void AutocompleteController::AddHistoryContentsShortcut( match.provider = history_contents_provider_; result->AddMatch(match); } - -- cgit v1.1