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

Unified Diff: components/omnibox/browser/search_provider.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 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: components/omnibox/browser/search_provider.cc
diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
index ab129045d463d475bec2afa4412c14ecfade3212..bdbe7c8e45f87658b015d131e27bf75d26de3809 100644
--- a/components/omnibox/browser/search_provider.cc
+++ b/components/omnibox/browser/search_provider.cc
@@ -446,11 +446,10 @@ void SearchProvider::UpdateMatchContentsClass(
sug_it != results->suggest_results.end(); ++sug_it) {
sug_it->ClassifyMatchContents(false, input_text);
}
- const std::string languages(client()->GetAcceptLanguages());
for (SearchSuggestionParser::NavigationResults::iterator nav_it =
results->navigation_results.begin();
nav_it != results->navigation_results.end(); ++nav_it) {
- nav_it->CalculateAndClassifyMatchContents(false, input_text, languages);
+ nav_it->CalculateAndClassifyMatchContents(false, input_text);
}
}
@@ -1417,13 +1416,12 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
url_formatter::kFormatUrlOmitAll &
~(trim_http ? 0 : url_formatter::kFormatUrlOmitHTTP);
- const std::string languages(client()->GetAcceptLanguages());
size_t inline_autocomplete_offset = (prefix == NULL) ?
base::string16::npos : (match_start + input.length());
match.fill_into_edit +=
AutocompleteInput::FormattedStringWithEquivalentMeaning(
navigation.url(),
- url_formatter::FormatUrl(navigation.url(), languages, format_types,
+ url_formatter::FormatUrl(navigation.url(), format_types,
net::UnescapeRule::SPACES, nullptr, nullptr,
&inline_autocomplete_offset),
client()->GetSchemeClassifier());
@@ -1455,7 +1453,7 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
!navigation.received_after_last_keystroke() &&
(match.inline_autocompletion.empty() ||
(!input_.prevent_inline_autocomplete() && !trimmed_whitespace));
- match.EnsureUWYTIsAllowedToBeDefault(input_, client()->GetAcceptLanguages(),
+ match.EnsureUWYTIsAllowedToBeDefault(input_,
client()->GetTemplateURLService());
match.contents = navigation.match_contents();
« no previous file with comments | « components/omnibox/browser/scored_history_match_unittest.cc ('k') | components/omnibox/browser/search_suggestion_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698