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

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: Fix double registration in Chrome Frame test. Created 7 years, 10 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 12 matching lines...) Expand all
23 #include "chrome/browser/browser_process.h" 23 #include "chrome/browser/browser_process.h"
24 #include "chrome/browser/chromeos/cros/cert_library.h" 24 #include "chrome/browser/chromeos/cros/cert_library.h"
25 #include "chrome/browser/chromeos/cros/cros_library.h" 25 #include "chrome/browser/chromeos/cros/cros_library.h"
26 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 26 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
27 #include "chrome/browser/chromeos/login/login_display.h" 27 #include "chrome/browser/chromeos/login/login_display.h"
28 #include "chrome/browser/chromeos/login/remove_user_delegate.h" 28 #include "chrome/browser/chromeos/login/remove_user_delegate.h"
29 #include "chrome/browser/chromeos/login/user_image_manager_impl.h" 29 #include "chrome/browser/chromeos/login/user_image_manager_impl.h"
30 #include "chrome/browser/chromeos/login/wizard_controller.h" 30 #include "chrome/browser/chromeos/login/wizard_controller.h"
31 #include "chrome/browser/chromeos/power/session_length_limiter.h" 31 #include "chrome/browser/chromeos/power/session_length_limiter.h"
32 #include "chrome/browser/policy/browser_policy_connector.h" 32 #include "chrome/browser/policy/browser_policy_connector.h"
33 #include "chrome/browser/prefs/pref_registry_simple.h"
33 #include "chrome/browser/prefs/pref_service.h" 34 #include "chrome/browser/prefs/pref_service.h"
34 #include "chrome/browser/prefs/scoped_user_pref_update.h" 35 #include "chrome/browser/prefs/scoped_user_pref_update.h"
35 #include "chrome/browser/profiles/profile_manager.h" 36 #include "chrome/browser/profiles/profile_manager.h"
36 #include "chrome/browser/sync/profile_sync_service.h" 37 #include "chrome/browser/sync/profile_sync_service.h"
37 #include "chrome/browser/sync/profile_sync_service_factory.h" 38 #include "chrome/browser/sync/profile_sync_service_factory.h"
38 #include "chrome/common/chrome_notification_types.h" 39 #include "chrome/common/chrome_notification_types.h"
39 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
40 #include "chrome/common/pref_names.h" 41 #include "chrome/common/pref_names.h"
41 #include "chromeos/cryptohome/async_method_caller.h" 42 #include "chromeos/cryptohome/async_method_caller.h"
42 #include "content/public/browser/browser_thread.h" 43 #include "content/public/browser/browser_thread.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 152 }
152 users_vector->push_back(email); 153 users_vector->push_back(email);
153 } 154 }
154 users_set->erase(logged_in_user); 155 users_set->erase(logged_in_user);
155 return logged_in_user_on_list; 156 return logged_in_user_on_list;
156 } 157 }
157 158
158 } // namespace 159 } // namespace
159 160
160 // static 161 // static
161 void UserManager::RegisterPrefs(PrefServiceSimple* local_state) { 162 void UserManager::RegisterPrefs(PrefRegistrySimple* registry) {
162 local_state->RegisterListPref(kRegularUsers); 163 registry->RegisterListPref(kRegularUsers);
163 local_state->RegisterListPref(kPublicAccounts); 164 registry->RegisterListPref(kPublicAccounts);
164 local_state->RegisterListPref(kLocallyManagedUsersFirstRun); 165 registry->RegisterListPref(kLocallyManagedUsersFirstRun);
165 local_state->RegisterIntegerPref(kLocallyManagedUsersNextId, 0); 166 registry->RegisterIntegerPref(kLocallyManagedUsersNextId, 0);
166 local_state->RegisterStringPref(kPublicAccountPendingDataRemoval, ""); 167 registry->RegisterStringPref(kPublicAccountPendingDataRemoval, "");
167 local_state->RegisterDictionaryPref(kUserOAuthTokenStatus); 168 registry->RegisterDictionaryPref(kUserOAuthTokenStatus);
168 local_state->RegisterDictionaryPref(kUserDisplayName); 169 registry->RegisterDictionaryPref(kUserDisplayName);
169 local_state->RegisterDictionaryPref(kUserDisplayEmail); 170 registry->RegisterDictionaryPref(kUserDisplayEmail);
170 SessionLengthLimiter::RegisterPrefs(local_state); 171 SessionLengthLimiter::RegisterPrefs(registry);
171 } 172 }
172 173
173 UserManagerImpl::UserManagerImpl() 174 UserManagerImpl::UserManagerImpl()
174 : cros_settings_(CrosSettings::Get()), 175 : cros_settings_(CrosSettings::Get()),
175 device_local_account_policy_service_(NULL), 176 device_local_account_policy_service_(NULL),
176 users_loaded_(false), 177 users_loaded_(false),
177 logged_in_user_(NULL), 178 logged_in_user_(NULL),
178 session_started_(false), 179 session_started_(false),
179 is_current_user_owner_(false), 180 is_current_user_owner_(false),
180 is_current_user_new_(false), 181 is_current_user_new_(false),
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 } 1083 }
1083 1084
1084 void UserManagerImpl::NotifyUserListChanged() { 1085 void UserManagerImpl::NotifyUserListChanged() {
1085 content::NotificationService::current()->Notify( 1086 content::NotificationService::current()->Notify(
1086 chrome::NOTIFICATION_USER_LIST_CHANGED, 1087 chrome::NOTIFICATION_USER_LIST_CHANGED,
1087 content::Source<UserManager>(this), 1088 content::Source<UserManager>(this),
1088 content::NotificationService::NoDetails()); 1089 content::NotificationService::NoDetails());
1089 } 1090 }
1090 1091
1091 } // namespace chromeos 1092 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.h ('k') | chrome/browser/chromeos/login/user_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698