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

Unified Diff: chrome/browser/chromeos/base/locale_util.h

Issue 1055863002: ChromeOS: switch UI language before apps are loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix initial locale load, when no user is active yet. Created 5 years, 7 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/base/locale_util.h
diff --git a/chrome/browser/chromeos/base/locale_util.h b/chrome/browser/chromeos/base/locale_util.h
index 751378db499bbba4b916cf57df7821634c424017..6f76ec6ac82c004de79c9d7a2a8844299454a501 100644
--- a/chrome/browser/chromeos/base/locale_util.h
+++ b/chrome/browser/chromeos/base/locale_util.h
@@ -11,6 +11,8 @@
#include "base/memory/scoped_ptr.h"
+class Profile;
+
namespace base {
template <typename T>
@@ -42,7 +44,8 @@ typedef base::Callback<void(const LanguageSwitchResult& result)>
SwitchLanguageCallback;
// This function updates input methods only if requested. In general, you want
-// |enable_locale_keyboard_layouts = true|.
+// |enable_locale_keyboard_layouts = true|. |profile| is needed because IME
+// extensions are per-user.
// Note: in case of |enable_locale_keyboard_layouts = false|, the input method
// currently in use may not be supported by the new locale. Using the new locale
// with an unsupported input method may lead to undefined behavior. Use
@@ -51,7 +54,8 @@ typedef base::Callback<void(const LanguageSwitchResult& result)>
void SwitchLanguage(const std::string& locale,
const bool enable_locale_keyboard_layouts,
const bool login_layouts_only,
- const SwitchLanguageCallback& callback);
+ const SwitchLanguageCallback& callback,
+ Profile* profile);
} // namespace locale_util
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698