Index: components/omnibox/autocomplete_match.h |
diff --git a/components/omnibox/autocomplete_match.h b/components/omnibox/autocomplete_match.h |
index 8fd50acfc0d613e37eab609a43795be514ae9b58..da8510e83617cd79a6072eaee4afe7a425cacb9a 100644 |
--- a/components/omnibox/autocomplete_match.h |
+++ b/components/omnibox/autocomplete_match.h |
@@ -183,14 +183,18 @@ struct AutocompleteMatch { |
// left empty and the template URL (if any) is determined from the |
// destination's hostname. The template URL is used to strip off query args |
// other than the search terms themselves that would otherwise prevent doing |
- // proper deduping. |
+ // proper deduping. If |scheme_explicitly_entered| then the scheme is not |
+ // allowed to be altered during stripping, thus preventing two URLs with |
+ // different schemes from having the same stripped GURL. |
Peter Kasting
2015/04/25 00:03:12
Hmm, this doesn't seem quite right.
Consider user
Mark P
2015/04/27 22:26:05
Astute analysis.
Here's a follow-up question: if
|
static GURL GURLToStrippedGURL(const GURL& url, |
+ const bool scheme_explicitly_entered, |
TemplateURLService* template_url_service, |
const base::string16& keyword); |
// Computes the stripped destination URL (via GURLToStrippedGURL()) and |
// stores the result in |stripped_destination_url|. |
- void ComputeStrippedDestinationURL(TemplateURLService* template_url_service); |
+ void ComputeStrippedDestinationURL(const bool scheme_explicitly_entered, |
+ TemplateURLService* template_url_service); |
// Sets |allowed_to_be_default_match| to true if this match is effectively |
// the URL-what-you-typed match (i.e., would be dupped against the UWYT |
@@ -198,6 +202,7 @@ struct AutocompleteMatch { |
// the AutocompleteInput interpreted as a URL (i.e., |
// AutocompleteInput::canonicalized_url()). |
void EnsureUWYTIsAllowedToBeDefault(const GURL& canonical_input_url, |
+ const bool scheme_explicitly_entered, |
TemplateURLService* template_url_service); |
// Gets data relevant to whether there should be any special keyword-related |