summaryrefslogtreecommitdiffstats
path: root/chrome/common/spellcheck_common.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-29 18:27:01 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-29 18:27:01 +0000
commitc98c928aa38e31d44c7a792f0d12da84471639ff (patch)
tree1e1050d39385fbdb787f5ae15dd2a38a143c8ebd /chrome/common/spellcheck_common.cc
parentbab01969064bdb23cbd403aa86ddc85659d7b74e (diff)
downloadchromium_src-c98c928aa38e31d44c7a792f0d12da84471639ff.zip
chromium_src-c98c928aa38e31d44c7a792f0d12da84471639ff.tar.gz
chromium_src-c98c928aa38e31d44c7a792f0d12da84471639ff.tar.bz2
Revert 79651 - Coverity: Pass parameters by reference.
Also remove an unused function that I found. CID=2634,4471,5392,6433,6434,6535,6777,6780,6781,6792,6810,7665,7759,8056,8072, 8637,8718,8726 BUG=none TEST=non R=csilv@chromium.org Review URL: http://codereview.chromium.org/6730046 TBR=jhawkins@chromium.org Review URL: http://codereview.chromium.org/6773015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/spellcheck_common.cc')
-rw-r--r--chrome/common/spellcheck_common.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/common/spellcheck_common.cc b/chrome/common/spellcheck_common.cc
index 26d90ce..21ff923 100644
--- a/chrome/common/spellcheck_common.cc
+++ b/chrome/common/spellcheck_common.cc
@@ -169,4 +169,17 @@ void SpellCheckLanguages(std::vector<std::string>* languages) {
}
}
+
+std::string GetLanguageFromLanguageRegion(std::string input_language) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(g_supported_spellchecker_languages);
+ ++i) {
+ std::string language(
+ g_supported_spellchecker_languages[i].language_region);
+ if (language == input_language)
+ return std::string(g_supported_spellchecker_languages[i].language);
+ }
+
+ return input_language;
+}
+
} // namespace SpellCheckCommon