Chromium Code Reviews| 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..2cb3b08b438334f39aabd7a7764c7588ac8c6c57 100644 |
| --- a/components/search_engines/template_url.cc |
| +++ b/components/search_engines/template_url.cc |
| @@ -1181,16 +1181,14 @@ TemplateURL::~TemplateURL() { |
| // static |
| base::string16 TemplateURL::GenerateKeyword( |
| - const GURL& url, |
| - const std::string& accept_languages) { |
| + const GURL& url) { |
|
Peter Kasting
2016/04/05 02:42:33
Nit: Rewrap
jungshik at Google
2016/04/05 18:56:19
Done.
|
| 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 +1450,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)); |
| } |
| } |