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/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 #include "chromeos/dbus/cryptohome_client.h" | 89 #include "chromeos/dbus/cryptohome_client.h" |
90 #include "chromeos/dbus/dbus_thread_manager.h" | 90 #include "chromeos/dbus/dbus_thread_manager.h" |
91 #include "chromeos/dbus/session_manager_client.h" | 91 #include "chromeos/dbus/session_manager_client.h" |
92 #include "chromeos/login/auth/stub_authenticator.h" | 92 #include "chromeos/login/auth/stub_authenticator.h" |
93 #include "chromeos/login/user_names.h" | 93 #include "chromeos/login/user_names.h" |
94 #include "chromeos/network/portal_detector/network_portal_detector.h" | 94 #include "chromeos/network/portal_detector/network_portal_detector.h" |
95 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" | 95 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" |
96 #include "chromeos/settings/cros_settings_names.h" | 96 #include "chromeos/settings/cros_settings_names.h" |
97 #include "components/arc/arc_bridge_service.h" | 97 #include "components/arc/arc_bridge_service.h" |
98 #include "components/arc/arc_service_manager.h" | 98 #include "components/arc/arc_service_manager.h" |
99 #include "components/arc/userdata/arc_user_data_service.h" | |
99 #include "components/component_updater/component_updater_service.h" | 100 #include "components/component_updater/component_updater_service.h" |
100 #include "components/flags_ui/pref_service_flags_storage.h" | 101 #include "components/flags_ui/pref_service_flags_storage.h" |
101 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 102 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
102 #include "components/prefs/pref_member.h" | 103 #include "components/prefs/pref_member.h" |
103 #include "components/prefs/pref_registry_simple.h" | 104 #include "components/prefs/pref_registry_simple.h" |
104 #include "components/prefs/pref_service.h" | 105 #include "components/prefs/pref_service.h" |
105 #include "components/quirks/quirks_manager.h" | 106 #include "components/quirks/quirks_manager.h" |
106 #include "components/session_manager/core/session_manager.h" | 107 #include "components/session_manager/core/session_manager.h" |
107 #include "components/signin/core/account_id/account_id.h" | 108 #include "components/signin/core/account_id/account_id.h" |
108 #include "components/signin/core/browser/account_tracker_service.h" | 109 #include "components/signin/core/browser/account_tracker_service.h" |
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1149 const user_manager::User* user = | 1150 const user_manager::User* user = |
1150 ProfileHelper::Get()->GetUserByProfile(profile); | 1151 ProfileHelper::Get()->GetUserByProfile(profile); |
1151 if (user_manager->GetPrimaryUser() == user) { | 1152 if (user_manager->GetPrimaryUser() == user) { |
1152 InitRlz(profile); | 1153 InitRlz(profile); |
1153 InitializeCerts(profile); | 1154 InitializeCerts(profile); |
1154 InitializeCRLSetFetcher(user); | 1155 InitializeCRLSetFetcher(user); |
1155 InitializeCertificateTransparencyComponents(user); | 1156 InitializeCertificateTransparencyComponents(user); |
1156 | 1157 |
1157 if (arc::ArcBridgeService::GetEnabled( | 1158 if (arc::ArcBridgeService::GetEnabled( |
1158 base::CommandLine::ForCurrentProcess())) { | 1159 base::CommandLine::ForCurrentProcess())) { |
1160 const AccountId& account_id = | |
1161 multi_user_util::GetAccountIdFromProfile(profile); | |
1159 DCHECK(arc::ArcServiceManager::Get()); | 1162 DCHECK(arc::ArcServiceManager::Get()); |
1160 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( | 1163 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared(account_id); |
Luis Héctor Chávez
2016/05/17 16:11:55
more or less in the same spirit of other comments
dspaid
2016/05/18 00:11:24
Done.
| |
1161 multi_user_util::GetAccountIdFromProfile(profile)); | |
1162 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); | 1164 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); |
1163 DCHECK(arc_auth_service); | 1165 DCHECK(arc_auth_service); |
1164 arc_auth_service->OnPrimaryUserProfilePrepared(profile); | 1166 arc_auth_service->OnPrimaryUserProfilePrepared(profile); |
1167 DCHECK(arc::ArcUserDataService::Get()); | |
1168 arc::ArcUserDataService::Get()->ClearIfDisabled(profile->GetPrefs(), | |
1169 account_id); | |
1165 } | 1170 } |
1166 } | 1171 } |
1167 | 1172 |
1168 UpdateEasyUnlockKeys(user_context_); | 1173 UpdateEasyUnlockKeys(user_context_); |
1169 user_context_.ClearSecrets(); | 1174 user_context_.ClearSecrets(); |
1170 if (TokenHandlesEnabled()) { | 1175 if (TokenHandlesEnabled()) { |
1171 CreateTokenUtilIfMissing(); | 1176 CreateTokenUtilIfMissing(); |
1172 if (token_handle_util_->ShouldObtainHandle(user->GetAccountId())) { | 1177 if (token_handle_util_->ShouldObtainHandle(user->GetAccountId())) { |
1173 if (!token_handle_fetcher_.get()) { | 1178 if (!token_handle_fetcher_.get()) { |
1174 token_handle_fetcher_.reset(new TokenHandleFetcher( | 1179 token_handle_fetcher_.reset(new TokenHandleFetcher( |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1831 token_handle_util_.reset(); | 1836 token_handle_util_.reset(); |
1832 first_run::GoodiesDisplayer::Delete(); | 1837 first_run::GoodiesDisplayer::Delete(); |
1833 } | 1838 } |
1834 | 1839 |
1835 void UserSessionManager::CreateTokenUtilIfMissing() { | 1840 void UserSessionManager::CreateTokenUtilIfMissing() { |
1836 if (!token_handle_util_.get()) | 1841 if (!token_handle_util_.get()) |
1837 token_handle_util_.reset(new TokenHandleUtil()); | 1842 token_handle_util_.reset(new TokenHandleUtil()); |
1838 } | 1843 } |
1839 | 1844 |
1840 } // namespace chromeos | 1845 } // namespace chromeos |
OLD | NEW |