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

Unified Diff: chrome/browser/autocomplete/search_provider.cc

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: use system srp and mpi libs, not local copies Created 9 years, 8 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
Index: chrome/browser/autocomplete/search_provider.cc
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index ed308bb822b07ad77594140e325805c3cf6e37b7..29482bbf330e4b9851363955724209085a446d29 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -366,17 +366,18 @@ bool SearchProvider::IsQuerySuitableForSuggest() const {
return true;
// Next we check the scheme. If this is UNKNOWN/REQUESTED_URL/URL with a
- // scheme that isn't http/https/ftp, we shouldn't send it. Sending things
- // like file: and data: is both a waste of time and a disclosure of
+ // scheme that isn't http/https/httpsv/ftp, we shouldn't send it. Sending
+ // things like file: and data: is both a waste of time and a disclosure of
// potentially private, local data. Other "schemes" may actually be
// usernames, and we don't want to send passwords. If the scheme is OK, we
- // still need to check other cases below. If this is QUERY, then the presence
- // of these schemes means the user explicitly typed one, and thus this is
- // probably a URL that's being entered and happens to currently be invalid --
- // in which case we again want to run our checks below. Other QUERY cases are
- // less likely to be URLs and thus we assume we're OK.
+ // still need to check other cases below. If this is QUERY, then the
+ // presence of these schemes means the user explicitly typed one, and thus
+ // this is probably a URL that's being entered and happens to currently be
+ // invalid -- in which case we again want to run our checks below. Other
+ // QUERY cases are less likely to be URLs and thus we assume we're OK.
if (!LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpScheme) &&
!LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpsScheme) &&
+ !LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpsvScheme) &&
!LowerCaseEqualsASCII(input_.scheme(), chrome::kFtpScheme))
return (input_.type() == AutocompleteInput::QUERY);
@@ -391,10 +392,11 @@ bool SearchProvider::IsQuerySuitableForSuggest() const {
parts.query.is_nonempty() || parts.ref.is_nonempty())
return false;
- // Don't send anything for https except the hostname. Hostnames are OK
+ // Don't send anything for https(v) except the hostname. Hostnames are OK
// because they are visible when the TCP connection is established, but the
// specific path may reveal private information.
- if (LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpsScheme) &&
+ if ((LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpsScheme) ||
+ LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpsvScheme)) &&
parts.path.is_nonempty())
return false;

Powered by Google App Engine
This is Rietveld 408576698