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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 620563002: ChromeOS NetworkScreenHandler should not call CheckAndResolveLocale on UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed debug. 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
Index: chrome/browser/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 4c4500c886ed0f836e0fdd3cfa87aa2d0c89fe44..d785a5971972e640610004a00a1012f41872bc3d 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -214,9 +214,7 @@ class LoginUtilsImpl : public LoginUtils,
static void RunCallbackOnLocaleLoaded(
const base::Closure& callback,
InputEventsBlocker* input_events_blocker,
- const std::string& locale,
- const std::string& loaded_locale,
- const bool success);
+ const locale_util::LanguageSwitchResult& result);
// Attempts restarting the browser process and esures that this does
// not happen while we are still fetching new OAuth refresh tokens.
@@ -326,9 +324,7 @@ void LoginUtilsImpl::DoBrowserLaunchInternal(Profile* profile,
void LoginUtilsImpl::RunCallbackOnLocaleLoaded(
const base::Closure& callback,
InputEventsBlocker* /* input_events_blocker */,
- const std::string& /* locale */,
- const std::string& /* loaded_locale */,
- const bool /* success */) {
+ const locale_util::LanguageSwitchResult& /* result */) {
callback.Run();
}
@@ -339,17 +335,14 @@ void LoginUtilsImpl::RespectLocalePreference(Profile* profile,
user_manager::User* const user =
ProfileHelper::Get()->GetUserByProfile(profile);
- scoped_ptr<locale_util::SwitchLanguageCallback> locale_switched_callback(
- new locale_util::SwitchLanguageCallback(base::Bind(
- &LoginUtilsImpl::RunCallbackOnLocaleLoaded,
- callback,
- base::Owned(new InputEventsBlocker)))); // Block UI events until
- // the ResourceBundle is
- // reloaded.
+ locale_util::SwitchLanguageCallback locale_switched_callback(base::Bind(
+ &LoginUtilsImpl::RunCallbackOnLocaleLoaded,
+ callback,
+ base::Owned(new InputEventsBlocker))); // Block UI events until
+ // the ResourceBundle is
+ // reloaded.
if (!UserSessionManager::GetInstance()->RespectLocalePreference(
- profile,
- user,
- locale_switched_callback.Pass())) {
+ profile, user, locale_switched_callback)) {
callback.Run();
}
}

Powered by Google App Engine
This is Rietveld 408576698