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

Unified Diff: chromeos/ime/input_method_whitelist.cc

Issue 23297004: Remove ExtraLanguage entries from InputMethodUtil. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove obsolete tests. Created 7 years, 4 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: chromeos/ime/input_method_whitelist.cc
diff --git a/chromeos/ime/input_method_whitelist.cc b/chromeos/ime/input_method_whitelist.cc
index cea052c594f629be000d89ca6381341cf8d9173d..d798e09f7b60fda6d194d183baa9cc62f00f7d94 100644
--- a/chromeos/ime/input_method_whitelist.cc
+++ b/chromeos/ime/input_method_whitelist.cc
@@ -6,12 +6,15 @@
#include <vector>
+#include "base/strings/string_util.h"
#include "chromeos/ime/input_method_descriptor.h"
#include "chromeos/ime/input_methods.h"
namespace chromeos {
namespace input_method {
+const char kLanguageDelimiter[] = ",";
+
InputMethodWhitelist::InputMethodWhitelist() {
for (size_t i = 0; i < arraysize(kInputMethods); ++i) {
supported_input_methods_.insert(kInputMethods[i].input_method_id);
@@ -35,7 +38,8 @@ InputMethodWhitelist::GetSupportedInputMethods() const {
layouts.push_back(kInputMethods[i].xkb_layout_id);
std::vector<std::string> languages;
- languages.push_back(kInputMethods[i].language_code);
+ Tokenize(kInputMethods[i].language_code, kLanguageDelimiter, &languages);
+ DCHECK(!languages.empty());
input_methods->push_back(InputMethodDescriptor(
kInputMethods[i].input_method_id,
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/cros_language_options_handler_unittest.cc ('k') | chromeos/ime/input_methods.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698