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

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

Issue 442043002: ProfileManager doesn't depend on "--login-profile" switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased and comments addressed. Created 6 years, 4 months 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 | Annotate | Revision Log
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/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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 btl->AddLoginTimeMarker("UserLoggedIn-End", false); 594 btl->AddLoginTimeMarker("UserLoggedIn-End", false);
595 } 595 }
596 596
597 void UserSessionManager::PrepareProfile() { 597 void UserSessionManager::PrepareProfile() {
598 bool is_demo_session = 598 bool is_demo_session =
599 DemoAppLauncher::IsDemoAppSession(user_context_.GetUserID()); 599 DemoAppLauncher::IsDemoAppSession(user_context_.GetUserID());
600 600
601 // TODO(nkostylev): Figure out whether demo session is using the right profile 601 // TODO(nkostylev): Figure out whether demo session is using the right profile
602 // path or not. See https://codereview.chromium.org/171423009 602 // path or not. See https://codereview.chromium.org/171423009
603 g_browser_process->profile_manager()->CreateProfileAsync( 603 g_browser_process->profile_manager()->CreateProfileAsync(
604 ProfileHelper::GetUserProfileDirByUserId(user_context_.GetUserID()), 604 ProfileHelper::GetProfilePathByUserIdHash(user_context_.GetUserIDHash()),
605 base::Bind(&UserSessionManager::OnProfileCreated, 605 base::Bind(&UserSessionManager::OnProfileCreated,
606 AsWeakPtr(), 606 AsWeakPtr(),
607 user_context_, 607 user_context_,
608 is_demo_session), 608 is_demo_session),
609 base::string16(), 609 base::string16(),
610 base::string16(), 610 base::string16(),
611 std::string()); 611 std::string());
612 } 612 }
613 613
614 void UserSessionManager::OnProfileCreated(const UserContext& user_context, 614 void UserSessionManager::OnProfileCreated(const UserContext& user_context,
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 976
977 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() { 977 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() {
978 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 978 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
979 user_sessions_restored_ = true; 979 user_sessions_restored_ = true;
980 FOR_EACH_OBSERVER(UserSessionStateObserver, 980 FOR_EACH_OBSERVER(UserSessionStateObserver,
981 session_state_observer_list_, 981 session_state_observer_list_,
982 PendingUserSessionsRestoreFinished()); 982 PendingUserSessionsRestoreFinished());
983 } 983 }
984 984
985 } // namespace chromeos 985 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698