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

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

Issue 664503003: Revert of Revert of 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
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 c707190a2ef8c35ba64ca1450a74fadc3fbcd93e..7921718b7bc14aaed656b68b0ed7118585ace04f 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -212,7 +212,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.
@@ -322,7 +324,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();
}
@@ -333,14 +337,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();
}
}
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/login/session/user_session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698