Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Side by Side Diff: chrome/browser/chromeos/login/session/chrome_session_manager.cc

Issue 2507073002: Split ArcSessionManager from ArcAuthService. (Closed)
Patch Set: Fix rebase mistake Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/chrome_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/sys_info.h" 11 #include "base/sys_info.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/browser_process_platform_part_chromeos.h" 13 #include "chrome/browser/browser_process_platform_part_chromeos.h"
14 #include "chrome/browser/chrome_notification_types.h" 14 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" 15 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
16 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 16 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
17 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 17 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
18 #include "chrome/browser/chromeos/arc/arc_auth_service.h" 18 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
19 #include "chrome/browser/chromeos/boot_times_recorder.h" 19 #include "chrome/browser/chromeos/boot_times_recorder.h"
20 #include "chrome/browser/chromeos/login/login_wizard.h" 20 #include "chrome/browser/chromeos/login/login_wizard.h"
21 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 21 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
22 #include "chrome/browser/chromeos/login/wizard_controller.h" 22 #include "chrome/browser/chromeos/login/wizard_controller.h"
23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/signin/signin_manager_factory.h" 25 #include "chrome/browser/signin/signin_manager_factory.h"
26 #include "chrome/browser/ui/ash/ash_util.h" 26 #include "chrome/browser/ui/ash/ash_util.h"
27 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 27 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
28 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 if (arc::ArcBridgeService::GetEnabled( 112 if (arc::ArcBridgeService::GetEnabled(
113 base::CommandLine::ForCurrentProcess())) { 113 base::CommandLine::ForCurrentProcess())) {
114 DCHECK(arc::ArcServiceManager::Get()); 114 DCHECK(arc::ArcServiceManager::Get());
115 std::unique_ptr<BooleanPrefMember> arc_enabled_pref = 115 std::unique_ptr<BooleanPrefMember> arc_enabled_pref =
116 base::MakeUnique<BooleanPrefMember>(); 116 base::MakeUnique<BooleanPrefMember>();
117 arc_enabled_pref->Init(prefs::kArcEnabled, user_profile->GetPrefs()); 117 arc_enabled_pref->Init(prefs::kArcEnabled, user_profile->GetPrefs());
118 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( 118 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared(
119 multi_user_util::GetAccountIdFromProfile(user_profile), 119 multi_user_util::GetAccountIdFromProfile(user_profile),
120 std::move(arc_enabled_pref)); 120 std::move(arc_enabled_pref));
121 DCHECK(arc::ArcAuthService::Get()); 121 DCHECK(arc::ArcSessionManager::Get());
122 arc::ArcAuthService::Get()->OnPrimaryUserProfilePrepared(user_profile); 122 arc::ArcSessionManager::Get()->OnPrimaryUserProfilePrepared(user_profile);
123 } 123 }
124 124
125 // Send the PROFILE_PREPARED notification and call SessionStarted() 125 // Send the PROFILE_PREPARED notification and call SessionStarted()
126 // so that the Launcher and other Profile dependent classes are created. 126 // so that the Launcher and other Profile dependent classes are created.
127 content::NotificationService::current()->Notify( 127 content::NotificationService::current()->Notify(
128 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 128 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
129 content::NotificationService::AllSources(), 129 content::NotificationService::AllSources(),
130 content::Details<Profile>(user_profile)); 130 content::Details<Profile>(user_profile));
131 131
132 // This call will set session state to SESSION_STATE_ACTIVE (same one). 132 // This call will set session state to SESSION_STATE_ACTIVE (same one).
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 const std::string& user_id_hash, 247 const std::string& user_id_hash,
248 bool browser_restart) { 248 bool browser_restart) {
249 BootTimesRecorder* btl = BootTimesRecorder::Get(); 249 BootTimesRecorder* btl = BootTimesRecorder::Get();
250 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); 250 btl->AddLoginTimeMarker("UserLoggedIn-Start", false);
251 session_manager::SessionManager::NotifyUserLoggedIn( 251 session_manager::SessionManager::NotifyUserLoggedIn(
252 user_account_id, user_id_hash, browser_restart); 252 user_account_id, user_id_hash, browser_restart);
253 btl->AddLoginTimeMarker("UserLoggedIn-End", false); 253 btl->AddLoginTimeMarker("UserLoggedIn-End", false);
254 } 254 }
255 255
256 } // namespace chromeos 256 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/info_private_api.cc ('k') | chrome/browser/chromeos/login/session/user_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698