| 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 btl->AddLoginTimeMarker("UserLoggedIn-End", false); | 592 btl->AddLoginTimeMarker("UserLoggedIn-End", false); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void UserSessionManager::PrepareProfile() { | 595 void UserSessionManager::PrepareProfile() { |
| 596 bool is_demo_session = | 596 bool is_demo_session = |
| 597 DemoAppLauncher::IsDemoAppSession(user_context_.GetUserID()); | 597 DemoAppLauncher::IsDemoAppSession(user_context_.GetUserID()); |
| 598 | 598 |
| 599 // TODO(nkostylev): Figure out whether demo session is using the right profile | 599 // TODO(nkostylev): Figure out whether demo session is using the right profile |
| 600 // path or not. See https://codereview.chromium.org/171423009 | 600 // path or not. See https://codereview.chromium.org/171423009 |
| 601 g_browser_process->profile_manager()->CreateProfileAsync( | 601 g_browser_process->profile_manager()->CreateProfileAsync( |
| 602 ProfileHelper::GetUserProfileDirByUserId(user_context_.GetUserID()), | 602 ProfileHelper::GetProfilePathByUserIdHash(user_context_.GetUserIDHash()), |
| 603 base::Bind(&UserSessionManager::OnProfileCreated, | 603 base::Bind(&UserSessionManager::OnProfileCreated, |
| 604 AsWeakPtr(), | 604 AsWeakPtr(), |
| 605 user_context_, | 605 user_context_, |
| 606 is_demo_session), | 606 is_demo_session), |
| 607 base::string16(), | 607 base::string16(), |
| 608 base::string16(), | 608 base::string16(), |
| 609 std::string()); | 609 std::string()); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void UserSessionManager::OnProfileCreated(const UserContext& user_context, | 612 void UserSessionManager::OnProfileCreated(const UserContext& user_context, |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 | 971 |
| 972 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() { | 972 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() { |
| 973 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 973 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 974 user_sessions_restored_ = true; | 974 user_sessions_restored_ = true; |
| 975 FOR_EACH_OBSERVER(UserSessionStateObserver, | 975 FOR_EACH_OBSERVER(UserSessionStateObserver, |
| 976 session_state_observer_list_, | 976 session_state_observer_list_, |
| 977 PendingUserSessionsRestoreFinished()); | 977 PendingUserSessionsRestoreFinished()); |
| 978 } | 978 } |
| 979 | 979 |
| 980 } // namespace chromeos | 980 } // namespace chromeos |
| OLD | NEW |