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

Unified Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 653123002: Revert of ChromeOS NetworkScreenHandler should not call CheckAndResolveLocale on UI thread. (patchs… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/base/locale_util.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 @@ class GuestLanguageSetCallbackData {
// 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 @@ class GuestLanguageSetCallbackData {
// 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 @@ void GuestLanguageSetCallbackData::Callback(
// 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 GuestLanguageSetCallbackData::Callback(
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() {
« no previous file with comments | « chrome/browser/chromeos/base/locale_util.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698