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

Unified Diff: components/omnibox/autocomplete_result.cc

Issue 1098843004: Omnibox - Do Not Allow HTTP/HTTPS Equivalence if User Explicitly Entered A Scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix browsertests compile error (sigh) Created 5 years, 6 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
« no previous file with comments | « components/omnibox/autocomplete_result.h ('k') | components/omnibox/autocomplete_result_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/autocomplete_result.cc
diff --git a/components/omnibox/autocomplete_result.cc b/components/omnibox/autocomplete_result.cc
index 0dc95ab17230975686fbe91b7ead6849fc8a2287..944ec6f31bc94e42b2396ad9ec4ee65f05f12322 100644
--- a/components/omnibox/autocomplete_result.cc
+++ b/components/omnibox/autocomplete_result.cc
@@ -123,6 +123,7 @@ AutocompleteResult::~AutocompleteResult() {}
void AutocompleteResult::CopyOldMatches(
const AutocompleteInput& input,
+ const std::string& languages,
const AutocompleteResult& old_matches,
TemplateURLService* template_url_service) {
if (old_matches.empty())
@@ -160,7 +161,7 @@ void AutocompleteResult::CopyOldMatches(
i->second, matches_per_provider[i->first]);
}
- SortAndCull(input, template_url_service);
+ SortAndCull(input, languages, template_url_service);
}
void AutocompleteResult::AppendMatches(const AutocompleteInput& input,
@@ -187,9 +188,10 @@ void AutocompleteResult::AppendMatches(const AutocompleteInput& input,
void AutocompleteResult::SortAndCull(
const AutocompleteInput& input,
+ const std::string& languages,
TemplateURLService* template_url_service) {
for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i)
- i->ComputeStrippedDestinationURL(template_url_service);
+ i->ComputeStrippedDestinationURL(input, languages, template_url_service);
DedupMatchesByDestination(input.current_page_classification(), true,
&matches_);
« no previous file with comments | « components/omnibox/autocomplete_result.h ('k') | components/omnibox/autocomplete_result_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698