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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to desired interfaces. Created 7 years, 11 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/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 11 matching lines...) Expand all
22 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/chromeos/cros/cert_library.h" 23 #include "chrome/browser/chromeos/cros/cert_library.h"
24 #include "chrome/browser/chromeos/cros/cros_library.h" 24 #include "chrome/browser/chromeos/cros/cros_library.h"
25 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 25 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
26 #include "chrome/browser/chromeos/login/login_display.h" 26 #include "chrome/browser/chromeos/login/login_display.h"
27 #include "chrome/browser/chromeos/login/remove_user_delegate.h" 27 #include "chrome/browser/chromeos/login/remove_user_delegate.h"
28 #include "chrome/browser/chromeos/login/user_image_manager_impl.h" 28 #include "chrome/browser/chromeos/login/user_image_manager_impl.h"
29 #include "chrome/browser/chromeos/login/wizard_controller.h" 29 #include "chrome/browser/chromeos/login/wizard_controller.h"
30 #include "chrome/browser/chromeos/power/session_length_limiter.h" 30 #include "chrome/browser/chromeos/power/session_length_limiter.h"
31 #include "chrome/browser/policy/browser_policy_connector.h" 31 #include "chrome/browser/policy/browser_policy_connector.h"
32 #include "chrome/browser/prefs/pref_registry_simple.h"
32 #include "chrome/browser/prefs/pref_service.h" 33 #include "chrome/browser/prefs/pref_service.h"
33 #include "chrome/browser/prefs/scoped_user_pref_update.h" 34 #include "chrome/browser/prefs/scoped_user_pref_update.h"
34 #include "chrome/browser/profiles/profile_manager.h" 35 #include "chrome/browser/profiles/profile_manager.h"
35 #include "chrome/browser/sync/profile_sync_service.h" 36 #include "chrome/browser/sync/profile_sync_service.h"
36 #include "chrome/browser/sync/profile_sync_service_factory.h" 37 #include "chrome/browser/sync/profile_sync_service_factory.h"
37 #include "chrome/common/chrome_notification_types.h" 38 #include "chrome/common/chrome_notification_types.h"
38 #include "chrome/common/chrome_switches.h" 39 #include "chrome/common/chrome_switches.h"
39 #include "chrome/common/pref_names.h" 40 #include "chrome/common/pref_names.h"
40 #include "chromeos/cryptohome/async_method_caller.h" 41 #include "chromeos/cryptohome/async_method_caller.h"
41 #include "content/public/browser/browser_thread.h" 42 #include "content/public/browser/browser_thread.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 143 }
143 users_vector->push_back(email); 144 users_vector->push_back(email);
144 } 145 }
145 users_set->erase(logged_in_user); 146 users_set->erase(logged_in_user);
146 return logged_in_user_on_list; 147 return logged_in_user_on_list;
147 } 148 }
148 149
149 } // namespace 150 } // namespace
150 151
151 // static 152 // static
152 void UserManager::RegisterPrefs(PrefServiceSimple* local_state) { 153 void UserManager::RegisterPrefs(PrefRegistrySimple* local_state) {
153 local_state->RegisterListPref(kRegularUsers); 154 local_state->RegisterListPref(kRegularUsers);
154 local_state->RegisterListPref(kPublicAccounts); 155 local_state->RegisterListPref(kPublicAccounts);
155 local_state->RegisterStringPref(kPublicAccountPendingDataRemoval, ""); 156 local_state->RegisterStringPref(kPublicAccountPendingDataRemoval, "");
156 local_state->RegisterDictionaryPref(kUserOAuthTokenStatus); 157 local_state->RegisterDictionaryPref(kUserOAuthTokenStatus);
157 local_state->RegisterDictionaryPref(kUserDisplayName); 158 local_state->RegisterDictionaryPref(kUserDisplayName);
158 local_state->RegisterDictionaryPref(kUserDisplayEmail); 159 local_state->RegisterDictionaryPref(kUserDisplayEmail);
159 SessionLengthLimiter::RegisterPrefs(local_state); 160 SessionLengthLimiter::RegisterPrefs(local_state);
160 } 161 }
161 162
162 UserManagerImpl::UserManagerImpl() 163 UserManagerImpl::UserManagerImpl()
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 device_local_account_policy_service_->GetBrokerForAccount(username); 1012 device_local_account_policy_service_->GetBrokerForAccount(username);
1012 if (broker) 1013 if (broker)
1013 display_name = broker->GetDisplayName(); 1014 display_name = broker->GetDisplayName();
1014 } 1015 }
1015 1016
1016 // Set or clear the display name. 1017 // Set or clear the display name.
1017 SaveUserDisplayName(username, UTF8ToUTF16(display_name)); 1018 SaveUserDisplayName(username, UTF8ToUTF16(display_name));
1018 } 1019 }
1019 1020
1020 } // namespace chromeos 1021 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698