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

Unified Diff: components/search_engines/keyword_table.cc

Issue 1238683003: Unpunycode search keywords and short names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Restrict IDN-decoding to keywords generated from URL; Use prefs::kAcceptLanguages for IDN-decoding Created 5 years, 5 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/search_engines/keyword_table.cc
diff --git a/components/search_engines/keyword_table.cc b/components/search_engines/keyword_table.cc
index a4ad483fef68df75a7929912daaaa95177d2b537..26be6284277bcf995db8e4d1c4ff598991b22ae3 100644
--- a/components/search_engines/keyword_table.cc
+++ b/components/search_engines/keyword_table.cc
@@ -452,7 +452,8 @@ bool KeywordTable::MigrateKeywordsTableForVersion45(const std::string& name) {
delete_entry = true;
} else {
// Ensure autogenerated keywords are unique.
- keyword = TemplateURL::GenerateKeyword(url);
+ keyword = TemplateURL::GenerateKeyword(
+ url, terms_data.GetAcceptedLanguages());
while (keywords.count(keyword))
keyword.append(base::ASCIIToUTF16("_"));
sql::Statement u(db_->GetUniqueStatement(

Powered by Google App Engine
This is Rietveld 408576698