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

Unified Diff: components/search_engines/template_url.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
« no previous file with comments | « components/search_engines/template_url.h ('k') | components/search_engines/template_url_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/template_url.cc
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
index 09881939035051d6a7bd6e7dff18e7c9883b575f..a29aa26310018148473697e6d93a2d671c952863 100644
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -1180,17 +1180,14 @@ TemplateURL::~TemplateURL() {
}
// static
-base::string16 TemplateURL::GenerateKeyword(
- const GURL& url,
- const std::string& accept_languages) {
+base::string16 TemplateURL::GenerateKeyword(const GURL& url) {
DCHECK(url.is_valid());
// Strip "www." off the front of the keyword; otherwise the keyword won't work
// properly. See http://code.google.com/p/chromium/issues/detail?id=6984 .
// |url|'s hostname may be IDN-encoded. Before generating |keyword| from it,
- // convert to Unicode using the user's accept-languages, so it won't look like
- // a confusing punycode string.
+ // convert to Unicode, so it won't look like a confusing punycode string.
base::string16 keyword = url_formatter::StripWWW(
- url_formatter::IDNToUnicode(url.host(), accept_languages));
+ url_formatter::IDNToUnicode(url.host()));
// Special case: if the host was exactly "www." (not sure this can happen but
// perhaps with some weird intranet and custom DNS server?), ensure we at
// least don't return the empty string.
@@ -1452,8 +1449,7 @@ void TemplateURL::ResetKeywordIfNecessary(
DCHECK(GetType() != OMNIBOX_API_EXTENSION);
GURL url(GenerateSearchURL(search_terms_data));
if (url.is_valid())
- data_.SetKeyword(
- GenerateKeyword(url, search_terms_data.GetAcceptLanguages()));
+ data_.SetKeyword(GenerateKeyword(url));
}
}
« no previous file with comments | « components/search_engines/template_url.h ('k') | components/search_engines/template_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698