| OLD | NEW |
| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "chrome/browser/chromeos/login/auth_sync_observer_factory.h" | 32 #include "chrome/browser/chromeos/login/auth_sync_observer_factory.h" |
| 33 #include "chrome/browser/chromeos/login/login_display.h" | 33 #include "chrome/browser/chromeos/login/login_display.h" |
| 34 #include "chrome/browser/chromeos/login/login_utils.h" | 34 #include "chrome/browser/chromeos/login/login_utils.h" |
| 35 #include "chrome/browser/chromeos/login/multi_profile_first_run_notification.h" | 35 #include "chrome/browser/chromeos/login/multi_profile_first_run_notification.h" |
| 36 #include "chrome/browser/chromeos/login/multi_profile_user_controller.h" | 36 #include "chrome/browser/chromeos/login/multi_profile_user_controller.h" |
| 37 #include "chrome/browser/chromeos/login/remove_user_delegate.h" | 37 #include "chrome/browser/chromeos/login/remove_user_delegate.h" |
| 38 #include "chrome/browser/chromeos/login/supervised_user_manager_impl.h" | 38 #include "chrome/browser/chromeos/login/supervised_user_manager_impl.h" |
| 39 #include "chrome/browser/chromeos/login/user_image_manager_impl.h" | 39 #include "chrome/browser/chromeos/login/user_image_manager_impl.h" |
| 40 #include "chrome/browser/chromeos/login/wizard_controller.h" | 40 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 41 #include "chrome/browser/chromeos/policy/device_local_account.h" | 41 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 42 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" |
| 42 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 43 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 43 #include "chrome/browser/chromeos/session_length_limiter.h" | 44 #include "chrome/browser/chromeos/session_length_limiter.h" |
| 44 #include "chrome/browser/lifetime/application_lifetime.h" | 45 #include "chrome/browser/lifetime/application_lifetime.h" |
| 45 #include "chrome/browser/policy/browser_policy_connector.h" | 46 #include "chrome/browser/policy/browser_policy_connector.h" |
| 46 #include "chrome/browser/profiles/profile.h" | 47 #include "chrome/browser/profiles/profile.h" |
| 47 #include "chrome/browser/profiles/profile_manager.h" | 48 #include "chrome/browser/profiles/profile_manager.h" |
| 48 #include "chrome/browser/sync/profile_sync_service.h" | 49 #include "chrome/browser/sync/profile_sync_service.h" |
| 49 #include "chrome/browser/sync/profile_sync_service_factory.h" | 50 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 50 #include "chrome/common/chrome_constants.h" | 51 #include "chrome/common/chrome_constants.h" |
| 51 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 | 1375 |
| 1375 DictionaryPrefUpdate prefs_given_name_update(prefs, kUserGivenName); | 1376 DictionaryPrefUpdate prefs_given_name_update(prefs, kUserGivenName); |
| 1376 prefs_given_name_update->RemoveWithoutPathExpansion(user_id, NULL); | 1377 prefs_given_name_update->RemoveWithoutPathExpansion(user_id, NULL); |
| 1377 | 1378 |
| 1378 DictionaryPrefUpdate prefs_display_email_update(prefs, kUserDisplayEmail); | 1379 DictionaryPrefUpdate prefs_display_email_update(prefs, kUserDisplayEmail); |
| 1379 prefs_display_email_update->RemoveWithoutPathExpansion(user_id, NULL); | 1380 prefs_display_email_update->RemoveWithoutPathExpansion(user_id, NULL); |
| 1380 | 1381 |
| 1381 supervised_user_manager_->RemoveNonCryptohomeData(user_id); | 1382 supervised_user_manager_->RemoveNonCryptohomeData(user_id); |
| 1382 | 1383 |
| 1383 multi_profile_user_controller_->RemoveCachedValue(user_id); | 1384 multi_profile_user_controller_->RemoveCachedValue(user_id); |
| 1385 |
| 1386 policy::PolicyCertServiceFactory::ClearUsedPolicyCertificates(user_id); |
| 1384 } | 1387 } |
| 1385 | 1388 |
| 1386 User* UserManagerImpl::RemoveRegularOrLocallyManagedUserFromList( | 1389 User* UserManagerImpl::RemoveRegularOrLocallyManagedUserFromList( |
| 1387 const std::string& user_id) { | 1390 const std::string& user_id) { |
| 1388 ListPrefUpdate prefs_users_update(g_browser_process->local_state(), | 1391 ListPrefUpdate prefs_users_update(g_browser_process->local_state(), |
| 1389 kRegularUsers); | 1392 kRegularUsers); |
| 1390 prefs_users_update->Clear(); | 1393 prefs_users_update->Clear(); |
| 1391 User* user = NULL; | 1394 User* user = NULL; |
| 1392 for (UserList::iterator it = users_.begin(); it != users_.end(); ) { | 1395 for (UserList::iterator it = users_.begin(); it != users_.end(); ) { |
| 1393 const std::string user_email = (*it)->email(); | 1396 const std::string user_email = (*it)->email(); |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 | 1818 |
| 1816 void UserManagerImpl::DoUpdateAccountLocale( | 1819 void UserManagerImpl::DoUpdateAccountLocale( |
| 1817 const std::string& user_id, | 1820 const std::string& user_id, |
| 1818 const std::string& resolved_locale) { | 1821 const std::string& resolved_locale) { |
| 1819 if (User* user = FindUserAndModify(user_id)) | 1822 if (User* user = FindUserAndModify(user_id)) |
| 1820 user->SetAccountLocale(resolved_locale); | 1823 user->SetAccountLocale(resolved_locale); |
| 1821 } | 1824 } |
| 1822 | 1825 |
| 1823 | 1826 |
| 1824 } // namespace chromeos | 1827 } // namespace chromeos |
| OLD | NEW |