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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 #include "chromeos/chromeos_switches.h" | 85 #include "chromeos/chromeos_switches.h" |
86 #include "chromeos/cryptohome/cryptohome_parameters.h" | 86 #include "chromeos/cryptohome/cryptohome_parameters.h" |
87 #include "chromeos/cryptohome/cryptohome_util.h" | 87 #include "chromeos/cryptohome/cryptohome_util.h" |
88 #include "chromeos/dbus/cryptohome_client.h" | 88 #include "chromeos/dbus/cryptohome_client.h" |
89 #include "chromeos/dbus/dbus_thread_manager.h" | 89 #include "chromeos/dbus/dbus_thread_manager.h" |
90 #include "chromeos/dbus/session_manager_client.h" | 90 #include "chromeos/dbus/session_manager_client.h" |
91 #include "chromeos/login/auth/stub_authenticator.h" | 91 #include "chromeos/login/auth/stub_authenticator.h" |
92 #include "chromeos/network/portal_detector/network_portal_detector.h" | 92 #include "chromeos/network/portal_detector/network_portal_detector.h" |
93 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" | 93 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" |
94 #include "chromeos/settings/cros_settings_names.h" | 94 #include "chromeos/settings/cros_settings_names.h" |
95 #include "components/arc/arc_bridge_service.h" | |
96 #include "components/component_updater/component_updater_service.h" | 95 #include "components/component_updater/component_updater_service.h" |
97 #include "components/flags_ui/pref_service_flags_storage.h" | 96 #include "components/flags_ui/pref_service_flags_storage.h" |
98 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 97 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
99 #include "components/prefs/pref_member.h" | 98 #include "components/prefs/pref_member.h" |
100 #include "components/prefs/pref_registry_simple.h" | 99 #include "components/prefs/pref_registry_simple.h" |
101 #include "components/prefs/pref_service.h" | 100 #include "components/prefs/pref_service.h" |
102 #include "components/quirks/quirks_manager.h" | 101 #include "components/quirks/quirks_manager.h" |
103 #include "components/session_manager/core/session_manager.h" | 102 #include "components/session_manager/core/session_manager.h" |
104 #include "components/signin/core/account_id/account_id.h" | 103 #include "components/signin/core/account_id/account_id.h" |
105 #include "components/signin/core/browser/account_tracker_service.h" | 104 #include "components/signin/core/browser/account_tracker_service.h" |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 | 1183 |
1185 // Initialize various services only for primary user. | 1184 // Initialize various services only for primary user. |
1186 const user_manager::User* user = | 1185 const user_manager::User* user = |
1187 ProfileHelper::Get()->GetUserByProfile(profile); | 1186 ProfileHelper::Get()->GetUserByProfile(profile); |
1188 if (user_manager->GetPrimaryUser() == user) { | 1187 if (user_manager->GetPrimaryUser() == user) { |
1189 InitRlz(profile); | 1188 InitRlz(profile); |
1190 InitializeCerts(profile); | 1189 InitializeCerts(profile); |
1191 InitializeCRLSetFetcher(user); | 1190 InitializeCRLSetFetcher(user); |
1192 InitializeCertificateTransparencyComponents(user); | 1191 InitializeCertificateTransparencyComponents(user); |
1193 | 1192 |
1194 if (arc::ArcBridgeService::GetEnabled( | 1193 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(profile); |
1195 base::CommandLine::ForCurrentProcess())) { | |
1196 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(profile); | |
1197 } | |
1198 } | 1194 } |
1199 | 1195 |
1200 UpdateEasyUnlockKeys(user_context_); | 1196 UpdateEasyUnlockKeys(user_context_); |
1201 user_context_.ClearSecrets(); | 1197 user_context_.ClearSecrets(); |
1202 if (TokenHandlesEnabled()) { | 1198 if (TokenHandlesEnabled()) { |
1203 CreateTokenUtilIfMissing(); | 1199 CreateTokenUtilIfMissing(); |
1204 if (token_handle_util_->ShouldObtainHandle(user->GetAccountId())) { | 1200 if (token_handle_util_->ShouldObtainHandle(user->GetAccountId())) { |
1205 if (!token_handle_fetcher_.get()) { | 1201 if (!token_handle_fetcher_.get()) { |
1206 token_handle_fetcher_.reset(new TokenHandleFetcher( | 1202 token_handle_fetcher_.reset(new TokenHandleFetcher( |
1207 token_handle_util_.get(), user->GetAccountId())); | 1203 token_handle_util_.get(), user->GetAccountId())); |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1891 ->browser_policy_connector_chromeos() | 1887 ->browser_policy_connector_chromeos() |
1892 ->IsEnterpriseManaged()) { | 1888 ->IsEnterpriseManaged()) { |
1893 return false; | 1889 return false; |
1894 } | 1890 } |
1895 | 1891 |
1896 // Do not show end of life notification if this is a guest session | 1892 // Do not show end of life notification if this is a guest session |
1897 return !profile->IsGuestSession(); | 1893 return !profile->IsGuestSession(); |
1898 } | 1894 } |
1899 | 1895 |
1900 } // namespace chromeos | 1896 } // namespace chromeos |
OLD | NEW |