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

Unified Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.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
« 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 45811c9f06cfa00a315f0591f082c1abbc0b07c8..9b218e44a3b4649d0bf2e64f55850532844b5213 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -461,9 +461,7 @@ class GuestLanguageSetCallbackData {
// Must match SwitchLanguageCallback type.
static void Callback(const scoped_ptr<GuestLanguageSetCallbackData>& self,
- const std::string& locale,
- const std::string& loaded_locale,
- bool success);
+ const locale_util::LanguageSwitchResult& result);
Profile* profile;
};
@@ -471,9 +469,7 @@ class GuestLanguageSetCallbackData {
// static
void GuestLanguageSetCallbackData::Callback(
const scoped_ptr<GuestLanguageSetCallbackData>& self,
- const std::string& locale,
- const std::string& loaded_locale,
- bool success) {
+ const locale_util::LanguageSwitchResult& result) {
input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get();
scoped_refptr<input_method::InputMethodManager::State> ime_state =
@@ -489,7 +485,7 @@ void GuestLanguageSetCallbackData::Callback(
// Second, enable locale based input methods.
const std::string locale_default_input_method =
manager->GetInputMethodUtil()->GetLanguageDefaultInputMethodId(
- loaded_locale);
+ result.loaded_locale);
if (!locale_default_input_method.empty()) {
PrefService* user_prefs = self->profile->GetPrefs();
user_prefs->SetString(prefs::kLanguagePreviousInputMethod,
@@ -507,13 +503,12 @@ void GuestLanguageSetCallbackData::Callback(
void SetGuestLocale(Profile* const profile) {
scoped_ptr<GuestLanguageSetCallbackData> data(
new GuestLanguageSetCallbackData(profile));
- scoped_ptr<locale_util::SwitchLanguageCallback> callback(
- new locale_util::SwitchLanguageCallback(base::Bind(
- &GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass()))));
+ locale_util::SwitchLanguageCallback callback(base::Bind(
+ &GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass())));
user_manager::User* const user =
ProfileHelper::Get()->GetUserByProfile(profile);
UserSessionManager::GetInstance()->RespectLocalePreference(
- profile, user, callback.Pass());
+ profile, user, callback);
}
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