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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 btl->AddLoginTimeMarker("UserLoggedIn-End", false); | 597 btl->AddLoginTimeMarker("UserLoggedIn-End", false); |
598 } | 598 } |
599 | 599 |
600 void UserSessionManager::PrepareProfile() { | 600 void UserSessionManager::PrepareProfile() { |
601 bool is_demo_session = | 601 bool is_demo_session = |
602 DemoAppLauncher::IsDemoAppSession(user_context_.GetUserID()); | 602 DemoAppLauncher::IsDemoAppSession(user_context_.GetUserID()); |
603 | 603 |
604 // TODO(nkostylev): Figure out whether demo session is using the right profile | 604 // TODO(nkostylev): Figure out whether demo session is using the right profile |
605 // path or not. See https://codereview.chromium.org/171423009 | 605 // path or not. See https://codereview.chromium.org/171423009 |
606 g_browser_process->profile_manager()->CreateProfileAsync( | 606 g_browser_process->profile_manager()->CreateProfileAsync( |
607 ProfileHelper::GetUserProfileDirByUserId(user_context_.GetUserID()), | 607 ProfileHelper::GetProfilePathByUserIdHash(user_context_.GetUserIDHash()), |
608 base::Bind(&UserSessionManager::OnProfileCreated, | 608 base::Bind(&UserSessionManager::OnProfileCreated, |
609 AsWeakPtr(), | 609 AsWeakPtr(), |
610 user_context_, | 610 user_context_, |
611 is_demo_session), | 611 is_demo_session), |
612 base::string16(), | 612 base::string16(), |
613 base::string16(), | 613 base::string16(), |
614 std::string()); | 614 std::string()); |
615 } | 615 } |
616 | 616 |
617 void UserSessionManager::OnProfileCreated(const UserContext& user_context, | 617 void UserSessionManager::OnProfileCreated(const UserContext& user_context, |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 default_ime_states_[profile]; | 999 default_ime_states_[profile]; |
1000 if (!state) { | 1000 if (!state) { |
1001 // Profile can be NULL in tests. | 1001 // Profile can be NULL in tests. |
1002 state = input_method::InputMethodManager::Get()->CreateNewState(profile); | 1002 state = input_method::InputMethodManager::Get()->CreateNewState(profile); |
1003 default_ime_states_[profile] = state; | 1003 default_ime_states_[profile] = state; |
1004 } | 1004 } |
1005 return state; | 1005 return state; |
1006 } | 1006 } |
1007 | 1007 |
1008 } // namespace chromeos | 1008 } // namespace chromeos |
OLD | NEW |