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 15 matching lines...) Expand all Loading... |
26 #include "base/threading/thread_task_runner_handle.h" | 26 #include "base/threading/thread_task_runner_handle.h" |
27 #include "base/threading/worker_pool.h" | 27 #include "base/threading/worker_pool.h" |
28 #include "chrome/browser/about_flags.h" | 28 #include "chrome/browser/about_flags.h" |
29 #include "chrome/browser/app_mode/app_mode_utils.h" | 29 #include "chrome/browser/app_mode/app_mode_utils.h" |
30 #include "chrome/browser/browser_process.h" | 30 #include "chrome/browser/browser_process.h" |
31 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 31 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
32 #include "chrome/browser/browser_shutdown.h" | 32 #include "chrome/browser/browser_shutdown.h" |
33 #include "chrome/browser/chrome_notification_types.h" | 33 #include "chrome/browser/chrome_notification_types.h" |
34 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 34 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
35 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 35 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
| 36 #include "chrome/browser/chromeos/arc/arc_user_data_service.h" |
36 #include "chrome/browser/chromeos/base/locale_util.h" | 37 #include "chrome/browser/chromeos/base/locale_util.h" |
37 #include "chrome/browser/chromeos/boot_times_recorder.h" | 38 #include "chrome/browser/chromeos/boot_times_recorder.h" |
38 #include "chrome/browser/chromeos/first_run/first_run.h" | 39 #include "chrome/browser/chromeos/first_run/first_run.h" |
39 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" | 40 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" |
40 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 41 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
41 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" | 42 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" |
42 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 43 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
43 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" | 44 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
44 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" | 45 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" |
45 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 46 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 InitializeCertificateTransparencyComponents(user); | 1159 InitializeCertificateTransparencyComponents(user); |
1159 | 1160 |
1160 if (arc::ArcBridgeService::GetEnabled( | 1161 if (arc::ArcBridgeService::GetEnabled( |
1161 base::CommandLine::ForCurrentProcess())) { | 1162 base::CommandLine::ForCurrentProcess())) { |
1162 const AccountId& account_id = | 1163 const AccountId& account_id = |
1163 multi_user_util::GetAccountIdFromProfile(profile); | 1164 multi_user_util::GetAccountIdFromProfile(profile); |
1164 std::unique_ptr<BooleanPrefMember> arc_enabled_pref = | 1165 std::unique_ptr<BooleanPrefMember> arc_enabled_pref = |
1165 base::MakeUnique<BooleanPrefMember>(); | 1166 base::MakeUnique<BooleanPrefMember>(); |
1166 arc_enabled_pref->Init(prefs::kArcEnabled, profile->GetPrefs()); | 1167 arc_enabled_pref->Init(prefs::kArcEnabled, profile->GetPrefs()); |
1167 DCHECK(arc::ArcServiceManager::Get()); | 1168 DCHECK(arc::ArcServiceManager::Get()); |
1168 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( | 1169 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared(account_id); |
1169 account_id, std::move(arc_enabled_pref)); | 1170 arc::ArcServiceManager::Get()->AddService( |
| 1171 base::WrapUnique(new arc::ArcUserDataService( |
| 1172 arc::ArcBridgeService::Get(), std::move(arc_enabled_pref), |
| 1173 account_id))); |
1170 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); | 1174 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); |
1171 DCHECK(arc_auth_service); | 1175 DCHECK(arc_auth_service); |
1172 arc_auth_service->OnPrimaryUserProfilePrepared(profile); | 1176 arc_auth_service->OnPrimaryUserProfilePrepared(profile); |
1173 } | 1177 } |
1174 } | 1178 } |
1175 | 1179 |
1176 UpdateEasyUnlockKeys(user_context_); | 1180 UpdateEasyUnlockKeys(user_context_); |
1177 user_context_.ClearSecrets(); | 1181 user_context_.ClearSecrets(); |
1178 if (TokenHandlesEnabled()) { | 1182 if (TokenHandlesEnabled()) { |
1179 CreateTokenUtilIfMissing(); | 1183 CreateTokenUtilIfMissing(); |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 ->browser_policy_connector_chromeos() | 1897 ->browser_policy_connector_chromeos() |
1894 ->IsEnterpriseManaged()) { | 1898 ->IsEnterpriseManaged()) { |
1895 return false; | 1899 return false; |
1896 } | 1900 } |
1897 | 1901 |
1898 // Do not show end of life notification if this is a guest session | 1902 // Do not show end of life notification if this is a guest session |
1899 return !profile->IsGuestSession(); | 1903 return !profile->IsGuestSession(); |
1900 } | 1904 } |
1901 | 1905 |
1902 } // namespace chromeos | 1906 } // namespace chromeos |
OLD | NEW |