| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/users/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/user_manager_impl.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/multi_profile_uma.h" | 10 #include "ash/multi_profile_uma.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" | 45 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" |
| 46 #include "chrome/browser/chromeos/login/wizard_controller.h" | 46 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 47 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 47 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
| 48 #include "chrome/browser/chromeos/net/network_portal_detector_strategy.h" | 48 #include "chrome/browser/chromeos/net/network_portal_detector_strategy.h" |
| 49 #include "chrome/browser/chromeos/ownership/owner_settings_service_factory.h" | 49 #include "chrome/browser/chromeos/ownership/owner_settings_service_factory.h" |
| 50 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 50 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 51 #include "chrome/browser/chromeos/policy/device_local_account.h" | 51 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 52 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.
h" | 52 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.
h" |
| 53 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 53 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 54 #include "chrome/browser/chromeos/session_length_limiter.h" | 54 #include "chrome/browser/chromeos/session_length_limiter.h" |
| 55 #include "chrome/browser/managed_mode/chromeos/managed_user_password_service_fac
tory.h" | |
| 56 #include "chrome/browser/managed_mode/chromeos/manager_password_service_factory.
h" | |
| 57 #include "chrome/browser/net/nss_context.h" | 55 #include "chrome/browser/net/nss_context.h" |
| 58 #include "chrome/browser/profiles/profile.h" | 56 #include "chrome/browser/profiles/profile.h" |
| 59 #include "chrome/browser/profiles/profile_manager.h" | 57 #include "chrome/browser/profiles/profile_manager.h" |
| 60 #include "chrome/browser/profiles/profiles_state.h" | 58 #include "chrome/browser/profiles/profiles_state.h" |
| 59 #include "chrome/browser/supervised_user/chromeos/manager_password_service_facto
ry.h" |
| 60 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi
ce_factory.h" |
| 61 #include "chrome/browser/sync/profile_sync_service.h" | 61 #include "chrome/browser/sync/profile_sync_service.h" |
| 62 #include "chrome/browser/sync/profile_sync_service_factory.h" | 62 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 63 #include "chrome/common/chrome_constants.h" | 63 #include "chrome/common/chrome_constants.h" |
| 64 #include "chrome/common/chrome_paths.h" | 64 #include "chrome/common/chrome_paths.h" |
| 65 #include "chrome/common/chrome_switches.h" | 65 #include "chrome/common/chrome_switches.h" |
| 66 #include "chrome/common/crash_keys.h" | 66 #include "chrome/common/crash_keys.h" |
| 67 #include "chrome/common/pref_names.h" | 67 #include "chrome/common/pref_names.h" |
| 68 #include "chromeos/cert_loader.h" | 68 #include "chromeos/cert_loader.h" |
| 69 #include "chromeos/chromeos_switches.h" | 69 #include "chromeos/chromeos_switches.h" |
| 70 #include "chromeos/cryptohome/async_method_caller.h" | 70 #include "chromeos/cryptohome/async_method_caller.h" |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 } | 935 } |
| 936 RetrieveTrustedDevicePolicies(); | 936 RetrieveTrustedDevicePolicies(); |
| 937 UpdateOwnership(); | 937 UpdateOwnership(); |
| 938 break; | 938 break; |
| 939 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: { | 939 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: { |
| 940 Profile* profile = content::Details<Profile>(details).ptr(); | 940 Profile* profile = content::Details<Profile>(details).ptr(); |
| 941 if (IsUserLoggedIn() && | 941 if (IsUserLoggedIn() && |
| 942 !IsLoggedInAsGuest() && | 942 !IsLoggedInAsGuest() && |
| 943 !IsLoggedInAsKioskApp()) { | 943 !IsLoggedInAsKioskApp()) { |
| 944 if (IsLoggedInAsLocallyManagedUser()) | 944 if (IsLoggedInAsLocallyManagedUser()) |
| 945 ManagedUserPasswordServiceFactory::GetForProfile(profile); | 945 SupervisedUserPasswordServiceFactory::GetForProfile(profile); |
| 946 if (IsLoggedInAsRegularUser()) | 946 if (IsLoggedInAsRegularUser()) |
| 947 ManagerPasswordServiceFactory::GetForProfile(profile); | 947 ManagerPasswordServiceFactory::GetForProfile(profile); |
| 948 | 948 |
| 949 if (!profile->IsOffTheRecord()) { | 949 if (!profile->IsOffTheRecord()) { |
| 950 AuthSyncObserver* sync_observer = | 950 AuthSyncObserver* sync_observer = |
| 951 AuthSyncObserverFactory::GetInstance()->GetForProfile(profile); | 951 AuthSyncObserverFactory::GetInstance()->GetForProfile(profile); |
| 952 sync_observer->StartObserving(); | 952 sync_observer->StartObserving(); |
| 953 multi_profile_user_controller_->StartObserving(profile); | 953 multi_profile_user_controller_->StartObserving(profile); |
| 954 } | 954 } |
| 955 } | 955 } |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 } | 2108 } |
| 2109 | 2109 |
| 2110 void UserManagerImpl::DeleteUser(User* user) { | 2110 void UserManagerImpl::DeleteUser(User* user) { |
| 2111 const bool is_active_user = (user == active_user_); | 2111 const bool is_active_user = (user == active_user_); |
| 2112 delete user; | 2112 delete user; |
| 2113 if (is_active_user) | 2113 if (is_active_user) |
| 2114 active_user_ = NULL; | 2114 active_user_ = NULL; |
| 2115 } | 2115 } |
| 2116 | 2116 |
| 2117 } // namespace chromeos | 2117 } // namespace chromeos |
| OLD | NEW |