| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 if (std::count(language_codes.begin(), language_codes.end(), | 1058 if (std::count(language_codes.begin(), language_codes.end(), |
| 1059 candidate) == 0) { | 1059 candidate) == 0) { |
| 1060 language_codes.push_back(candidate); | 1060 language_codes.push_back(candidate); |
| 1061 } | 1061 } |
| 1062 } | 1062 } |
| 1063 // Save the preferred languages in the user's preferences. | 1063 // Save the preferred languages in the user's preferences. |
| 1064 StringPrefMember language_preferred_languages; | 1064 StringPrefMember language_preferred_languages; |
| 1065 language_preferred_languages.Init(prefs::kLanguagePreferredLanguages, | 1065 language_preferred_languages.Init(prefs::kLanguagePreferredLanguages, |
| 1066 prefs, NULL); | 1066 prefs, NULL); |
| 1067 language_preferred_languages.SetValue(JoinString(language_codes, ',')); | 1067 language_preferred_languages.SetValue(JoinString(language_codes, ',')); |
| 1068 prefs->ScheduleSavePersistentPrefs(); | |
| 1069 } | 1068 } |
| 1070 | 1069 |
| 1071 scoped_refptr<Authenticator> LoginUtilsImpl::CreateAuthenticator( | 1070 scoped_refptr<Authenticator> LoginUtilsImpl::CreateAuthenticator( |
| 1072 LoginStatusConsumer* consumer) { | 1071 LoginStatusConsumer* consumer) { |
| 1073 // Screen locker needs new Authenticator instance each time. | 1072 // Screen locker needs new Authenticator instance each time. |
| 1074 if (ScreenLocker::default_screen_locker()) | 1073 if (ScreenLocker::default_screen_locker()) |
| 1075 authenticator_ = NULL; | 1074 authenticator_ = NULL; |
| 1076 | 1075 |
| 1077 // In case of non-WebUI login new instance of Authenticator is supposed | 1076 // In case of non-WebUI login new instance of Authenticator is supposed |
| 1078 // to be created on each call. | 1077 // to be created on each call. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 // browser before it is dereferenced by the login host. | 1341 // browser before it is dereferenced by the login host. |
| 1343 if (login_host) { | 1342 if (login_host) { |
| 1344 login_host->OnSessionStart(); | 1343 login_host->OnSessionStart(); |
| 1345 login_host->SetStatusAreaVisible(true); | 1344 login_host->SetStatusAreaVisible(true); |
| 1346 login_host->SetStatusAreaEnabled(true); | 1345 login_host->SetStatusAreaEnabled(true); |
| 1347 login_host = NULL; | 1346 login_host = NULL; |
| 1348 } | 1347 } |
| 1349 } | 1348 } |
| 1350 | 1349 |
| 1351 } // namespace chromeos | 1350 } // namespace chromeos |
| OLD | NEW |