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

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

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

Powered by Google App Engine
This is Rietveld 408576698