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

Unified Diff: chrome/browser/chromeos/input_method/input_method_delegate_impl.cc

Issue 14200032: Decouple l10n_util from InputMethodUtil. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: /MockInputMethodDelegate/FakeInputMethodDelegate/ Created 7 years, 8 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: chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc b/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
index 56e1190b8ae0ea6daf22b04a5414c26f97cd28ad..50a70b801bd5f77f926f4a7f07a4ccd8f256dbc3 100644
--- a/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
@@ -8,6 +8,7 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/pref_names.h"
+#include "ui/base/l10n/l10n_util.h"
namespace chromeos {
namespace input_method {
@@ -25,12 +26,17 @@ std::string InputMethodDelegateImpl::GetHardwareKeyboardLayout() const {
return std::string();
}
-std::string InputMethodDelegateImpl::GetActiveLocale() const {
- if (g_browser_process)
- return g_browser_process->GetApplicationLocale();
+string16 InputMethodDelegateImpl::GetLocalizedString(int resource_id) const {
+ return l10n_util::GetStringUTF16(resource_id);
+}
- NOTREACHED();
- return std::string();
+string16 InputMethodDelegateImpl::GetDisplayLanguageName(
+ const std::string& language_code) const {
+ DCHECK(g_browser_process);
+ return l10n_util::GetDisplayNameForLocale(
+ language_code,
+ g_browser_process->GetApplicationLocale(),
+ true);
}
} // namespace input_method

Powered by Google App Engine
This is Rietveld 408576698