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

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

Issue 686863002: Revert "Revert of Revert of Revert of ChromeOS NetworkScreenHandler should not call CheckAndResolve… (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 50a3be26626342a686b5a9b07f18ae7a1610f46e..67b60eef264c7a95ab5a0d425d4b6ac4d2868a4e 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -218,9 +218,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.
@@ -330,9 +328,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();
}
@@ -343,17 +339,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();
}
}
« 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