| Index: chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| index cccdc54f44108248af556d08cdf06280e8cecc12..da1c2b50f824061fe8431b3c1b5a96837cdfd4df 100644
|
| --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| @@ -452,7 +452,9 @@
|
|
|
| // Must match SwitchLanguageCallback type.
|
| static void Callback(const scoped_ptr<GuestLanguageSetCallbackData>& self,
|
| - const locale_util::LanguageSwitchResult& result);
|
| + const std::string& locale,
|
| + const std::string& loaded_locale,
|
| + bool success);
|
|
|
| Profile* profile;
|
| };
|
| @@ -460,7 +462,9 @@
|
| // static
|
| void GuestLanguageSetCallbackData::Callback(
|
| const scoped_ptr<GuestLanguageSetCallbackData>& self,
|
| - const locale_util::LanguageSwitchResult& result) {
|
| + const std::string& locale,
|
| + const std::string& loaded_locale,
|
| + bool success) {
|
| input_method::InputMethodManager* manager =
|
| input_method::InputMethodManager::Get();
|
| scoped_refptr<input_method::InputMethodManager::State> ime_state =
|
| @@ -476,7 +480,7 @@
|
| // Second, enable locale based input methods.
|
| const std::string locale_default_input_method =
|
| manager->GetInputMethodUtil()->GetLanguageDefaultInputMethodId(
|
| - result.loaded_locale);
|
| + loaded_locale);
|
| if (!locale_default_input_method.empty()) {
|
| PrefService* user_prefs = self->profile->GetPrefs();
|
| user_prefs->SetString(prefs::kLanguagePreviousInputMethod,
|
| @@ -494,12 +498,13 @@
|
| void SetGuestLocale(Profile* const profile) {
|
| scoped_ptr<GuestLanguageSetCallbackData> data(
|
| new GuestLanguageSetCallbackData(profile));
|
| - locale_util::SwitchLanguageCallback callback(base::Bind(
|
| - &GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass())));
|
| + scoped_ptr<locale_util::SwitchLanguageCallback> callback(
|
| + new locale_util::SwitchLanguageCallback(base::Bind(
|
| + &GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass()))));
|
| user_manager::User* const user =
|
| ProfileHelper::Get()->GetUserByProfile(profile);
|
| UserSessionManager::GetInstance()->RespectLocalePreference(
|
| - profile, user, callback);
|
| + profile, user, callback.Pass());
|
| }
|
|
|
| void ChromeBrowserMainPartsChromeos::PostProfileInit() {
|
|
|