| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 #include "chrome/browser/net/nss_context.h" | 65 #include "chrome/browser/net/nss_context.h" |
| 66 #include "chrome/browser/prefs/session_startup_pref.h" | 66 #include "chrome/browser/prefs/session_startup_pref.h" |
| 67 #include "chrome/browser/profiles/profile.h" | 67 #include "chrome/browser/profiles/profile.h" |
| 68 #include "chrome/browser/profiles/profile_manager.h" | 68 #include "chrome/browser/profiles/profile_manager.h" |
| 69 #include "chrome/browser/signin/account_tracker_service_factory.h" | 69 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 70 #include "chrome/browser/signin/easy_unlock_service.h" | 70 #include "chrome/browser/signin/easy_unlock_service.h" |
| 71 #include "chrome/browser/signin/signin_manager_factory.h" | 71 #include "chrome/browser/signin/signin_manager_factory.h" |
| 72 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 72 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
| 73 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa
ctory.h" | 73 #include "chrome/browser/supervised_user/child_accounts/child_account_service_fa
ctory.h" |
| 74 #include "chrome/browser/ui/app_list/start_page_service.h" | 74 #include "chrome/browser/ui/app_list/start_page_service.h" |
| 75 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| 75 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 76 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 76 #include "chrome/common/chrome_switches.h" | 77 #include "chrome/common/chrome_switches.h" |
| 77 #include "chrome/common/logging_chrome.h" | 78 #include "chrome/common/logging_chrome.h" |
| 78 #include "chrome/common/pref_names.h" | 79 #include "chrome/common/pref_names.h" |
| 79 #include "chromeos/cert_loader.h" | 80 #include "chromeos/cert_loader.h" |
| 80 #include "chromeos/chromeos_switches.h" | 81 #include "chromeos/chromeos_switches.h" |
| 81 #include "chromeos/cryptohome/cryptohome_util.h" | 82 #include "chromeos/cryptohome/cryptohome_util.h" |
| 82 #include "chromeos/dbus/cryptohome_client.h" | 83 #include "chromeos/dbus/cryptohome_client.h" |
| 83 #include "chromeos/dbus/dbus_thread_manager.h" | 84 #include "chromeos/dbus/dbus_thread_manager.h" |
| 84 #include "chromeos/dbus/session_manager_client.h" | 85 #include "chromeos/dbus/session_manager_client.h" |
| 85 #include "chromeos/login/auth/stub_authenticator.h" | 86 #include "chromeos/login/auth/stub_authenticator.h" |
| 86 #include "chromeos/login/user_names.h" | 87 #include "chromeos/login/user_names.h" |
| 87 #include "chromeos/network/portal_detector/network_portal_detector.h" | 88 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 88 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" | 89 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" |
| 89 #include "chromeos/settings/cros_settings_names.h" | 90 #include "chromeos/settings/cros_settings_names.h" |
| 91 #include "components/arc/arc_bridge_service.h" |
| 92 #include "components/arc/arc_service_manager.h" |
| 90 #include "components/component_updater/component_updater_service.h" | 93 #include "components/component_updater/component_updater_service.h" |
| 91 #include "components/flags_ui/pref_service_flags_storage.h" | 94 #include "components/flags_ui/pref_service_flags_storage.h" |
| 92 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 95 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 93 #include "components/session_manager/core/session_manager.h" | 96 #include "components/session_manager/core/session_manager.h" |
| 94 #include "components/signin/core/account_id/account_id.h" | 97 #include "components/signin/core/account_id/account_id.h" |
| 95 #include "components/signin/core/browser/account_tracker_service.h" | 98 #include "components/signin/core/browser/account_tracker_service.h" |
| 96 #include "components/signin/core/browser/signin_manager_base.h" | 99 #include "components/signin/core/browser/signin_manager_base.h" |
| 97 #include "components/user_manager/known_user.h" | 100 #include "components/user_manager/known_user.h" |
| 98 #include "components/user_manager/user.h" | 101 #include "components/user_manager/user.h" |
| 99 #include "components/user_manager/user_manager.h" | 102 #include "components/user_manager/user_manager.h" |
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 content::Details<Profile>(profile)); | 1116 content::Details<Profile>(profile)); |
| 1114 | 1117 |
| 1115 // Initialize various services only for primary user. | 1118 // Initialize various services only for primary user. |
| 1116 const user_manager::User* user = | 1119 const user_manager::User* user = |
| 1117 ProfileHelper::Get()->GetUserByProfile(profile); | 1120 ProfileHelper::Get()->GetUserByProfile(profile); |
| 1118 if (user_manager->GetPrimaryUser() == user) { | 1121 if (user_manager->GetPrimaryUser() == user) { |
| 1119 InitRlz(profile); | 1122 InitRlz(profile); |
| 1120 InitializeCerts(profile); | 1123 InitializeCerts(profile); |
| 1121 InitializeCRLSetFetcher(user); | 1124 InitializeCRLSetFetcher(user); |
| 1122 InitializeEVCertificatesWhitelistComponent(user); | 1125 InitializeEVCertificatesWhitelistComponent(user); |
| 1126 |
| 1127 if (arc::ArcBridgeService::GetEnabled( |
| 1128 base::CommandLine::ForCurrentProcess())) { |
| 1129 DCHECK(arc::ArcServiceManager::Get()); |
| 1130 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( |
| 1131 multi_user_util::GetAccountIdFromProfile(profile)); |
| 1132 } |
| 1123 } | 1133 } |
| 1124 | 1134 |
| 1125 UpdateEasyUnlockKeys(user_context_); | 1135 UpdateEasyUnlockKeys(user_context_); |
| 1126 user_context_.ClearSecrets(); | 1136 user_context_.ClearSecrets(); |
| 1127 if (TokenHandlesEnabled()) { | 1137 if (TokenHandlesEnabled()) { |
| 1128 CreateTokenUtilIfMissing(); | 1138 CreateTokenUtilIfMissing(); |
| 1129 if (token_handle_util_->ShouldObtainHandle(user->GetAccountId())) { | 1139 if (token_handle_util_->ShouldObtainHandle(user->GetAccountId())) { |
| 1130 if (!token_handle_fetcher_.get()) { | 1140 if (!token_handle_fetcher_.get()) { |
| 1131 token_handle_fetcher_.reset(new TokenHandleFetcher( | 1141 token_handle_fetcher_.reset(new TokenHandleFetcher( |
| 1132 token_handle_util_.get(), user->GetAccountId())); | 1142 token_handle_util_.get(), user->GetAccountId())); |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 token_handle_util_.reset(); | 1773 token_handle_util_.reset(); |
| 1764 first_run::GoodiesDisplayer::Delete(); | 1774 first_run::GoodiesDisplayer::Delete(); |
| 1765 } | 1775 } |
| 1766 | 1776 |
| 1767 void UserSessionManager::CreateTokenUtilIfMissing() { | 1777 void UserSessionManager::CreateTokenUtilIfMissing() { |
| 1768 if (!token_handle_util_.get()) | 1778 if (!token_handle_util_.get()) |
| 1769 token_handle_util_.reset(new TokenHandleUtil()); | 1779 token_handle_util_.reset(new TokenHandleUtil()); |
| 1770 } | 1780 } |
| 1771 | 1781 |
| 1772 } // namespace chromeos | 1782 } // namespace chromeos |
| OLD | NEW |