OLD | NEW |
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/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/user_manager_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 } | 141 } |
142 users_vector->push_back(email); | 142 users_vector->push_back(email); |
143 } | 143 } |
144 users_set->erase(logged_in_user); | 144 users_set->erase(logged_in_user); |
145 return logged_in_user_on_list; | 145 return logged_in_user_on_list; |
146 } | 146 } |
147 | 147 |
148 } // namespace | 148 } // namespace |
149 | 149 |
150 // static | 150 // static |
151 void UserManager::RegisterPrefs(PrefService* local_state) { | 151 void UserManager::RegisterPrefs(PrefServiceSimple* local_state) { |
152 local_state->RegisterListPref(kRegularUsers, PrefService::UNSYNCABLE_PREF); | 152 local_state->RegisterListPref(kRegularUsers); |
153 local_state->RegisterListPref(kPublicAccounts, PrefService::UNSYNCABLE_PREF); | 153 local_state->RegisterListPref(kPublicAccounts); |
154 local_state->RegisterStringPref(kPublicAccountPendingDataRemoval, "", | 154 local_state->RegisterStringPref(kPublicAccountPendingDataRemoval, ""); |
155 PrefService::UNSYNCABLE_PREF); | 155 local_state->RegisterDictionaryPref(kUserOAuthTokenStatus); |
156 local_state->RegisterDictionaryPref(kUserOAuthTokenStatus, | 156 local_state->RegisterDictionaryPref(kUserDisplayName); |
157 PrefService::UNSYNCABLE_PREF); | 157 local_state->RegisterDictionaryPref(kUserDisplayEmail); |
158 local_state->RegisterDictionaryPref(kUserDisplayName, | |
159 PrefService::UNSYNCABLE_PREF); | |
160 local_state->RegisterDictionaryPref(kUserDisplayEmail, | |
161 PrefService::UNSYNCABLE_PREF); | |
162 SessionLengthLimiter::RegisterPrefs(local_state); | 158 SessionLengthLimiter::RegisterPrefs(local_state); |
163 } | 159 } |
164 | 160 |
165 UserManagerImpl::UserManagerImpl() | 161 UserManagerImpl::UserManagerImpl() |
166 : cros_settings_(CrosSettings::Get()), | 162 : cros_settings_(CrosSettings::Get()), |
167 device_local_account_policy_service_(NULL), | 163 device_local_account_policy_service_(NULL), |
168 users_loaded_(false), | 164 users_loaded_(false), |
169 logged_in_user_(NULL), | 165 logged_in_user_(NULL), |
170 session_started_(false), | 166 session_started_(false), |
171 is_current_user_owner_(false), | 167 is_current_user_owner_(false), |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 device_local_account_policy_service_->GetBrokerForAccount(username); | 951 device_local_account_policy_service_->GetBrokerForAccount(username); |
956 if (broker) | 952 if (broker) |
957 display_name = broker->GetDisplayName(); | 953 display_name = broker->GetDisplayName(); |
958 } | 954 } |
959 | 955 |
960 // Set or clear the display name. | 956 // Set or clear the display name. |
961 SaveUserDisplayName(username, UTF8ToUTF16(display_name)); | 957 SaveUserDisplayName(username, UTF8ToUTF16(display_name)); |
962 } | 958 } |
963 | 959 |
964 } // namespace chromeos | 960 } // namespace chromeos |
OLD | NEW |