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

Unified Diff: content/browser/hyphenator/hyphenator_message_filter.cc

Issue 11748005: Merge 174304 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 12 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 | « chrome/common/spellcheck_common.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/hyphenator/hyphenator_message_filter.cc
===================================================================
--- content/browser/hyphenator/hyphenator_message_filter.cc (revision 174841)
+++ content/browser/hyphenator/hyphenator_message_filter.cc (working copy)
@@ -90,6 +90,14 @@
GetContentClient()->browser()->GetHyphenDictionaryDirectory();
}
std::string rule_file = locale.empty() ? "en-US" : UTF16ToASCII(locale);
+
+ // Currently, only en-US is hyphenated. This is a quick fix for
+ // http://crbug.com/167122.
+ // TODO(groby): The proper fix entails validating if locale is a properly
+ // formatted locale string, but knowledge about valid locales currently
+ // resides in chrome, not content.
+ if (rule_file != "en-US")
+ return;
rule_file.append("-1-0.dic");
FilePath rule_path = dictionary_base_.AppendASCII(rule_file);
dictionary_file_ = base::CreatePlatformFile(
« no previous file with comments | « chrome/common/spellcheck_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698