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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 9696025: Rename InputMethodManager::current_input_method() to InputMethodManager::GetCurrentInputMethod(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 void LoginUtilsImpl::SetFirstLoginPrefs(PrefService* prefs) { 1101 void LoginUtilsImpl::SetFirstLoginPrefs(PrefService* prefs) {
1102 VLOG(1) << "Setting first login prefs"; 1102 VLOG(1) << "Setting first login prefs";
1103 BootTimesLoader* btl = BootTimesLoader::Get(); 1103 BootTimesLoader* btl = BootTimesLoader::Get();
1104 std::string locale = g_browser_process->GetApplicationLocale(); 1104 std::string locale = g_browser_process->GetApplicationLocale();
1105 1105
1106 // First, we'll set kLanguagePreloadEngines. 1106 // First, we'll set kLanguagePreloadEngines.
1107 input_method::InputMethodManager* manager = 1107 input_method::InputMethodManager* manager =
1108 input_method::InputMethodManager::GetInstance(); 1108 input_method::InputMethodManager::GetInstance();
1109 std::vector<std::string> input_method_ids; 1109 std::vector<std::string> input_method_ids;
1110 manager->GetInputMethodUtil()->GetFirstLoginInputMethodIds( 1110 manager->GetInputMethodUtil()->GetFirstLoginInputMethodIds(
1111 locale, manager->current_input_method(), &input_method_ids); 1111 locale, manager->GetCurrentInputMethod(), &input_method_ids);
1112 // Save the input methods in the user's preferences. 1112 // Save the input methods in the user's preferences.
1113 StringPrefMember language_preload_engines; 1113 StringPrefMember language_preload_engines;
1114 language_preload_engines.Init(prefs::kLanguagePreloadEngines, 1114 language_preload_engines.Init(prefs::kLanguagePreloadEngines,
1115 prefs, NULL); 1115 prefs, NULL);
1116 language_preload_engines.SetValue(JoinString(input_method_ids, ',')); 1116 language_preload_engines.SetValue(JoinString(input_method_ids, ','));
1117 btl->AddLoginTimeMarker("IMEStarted", false); 1117 btl->AddLoginTimeMarker("IMEStarted", false);
1118 1118
1119 // Second, we'll set kLanguagePreferredLanguages. 1119 // Second, we'll set kLanguagePreferredLanguages.
1120 std::vector<std::string> language_codes; 1120 std::vector<std::string> language_codes;
1121 // The current locale should be on the top. 1121 // The current locale should be on the top.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 bool LoginUtils::IsWhitelisted(const std::string& username) { 1407 bool LoginUtils::IsWhitelisted(const std::string& username) {
1408 CrosSettings* cros_settings = CrosSettings::Get(); 1408 CrosSettings* cros_settings = CrosSettings::Get();
1409 bool allow_new_user = false; 1409 bool allow_new_user = false;
1410 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 1410 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
1411 if (allow_new_user) 1411 if (allow_new_user)
1412 return true; 1412 return true;
1413 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 1413 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
1414 } 1414 }
1415 1415
1416 } // namespace chromeos 1416 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698