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

Unified Diff: chrome/browser/chromeos/login/users/user_manager_impl.cc

Issue 290483003: Tame the proliferation of UserContext constructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/users/user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/users/user_manager_impl.cc b/chrome/browser/chromeos/login/users/user_manager_impl.cc
index 6ff719df49c612a0dbe299e31fed020280b0d0f4..3bcf5794bf18d83c6d3326510c6db7a72b15a28d 100644
--- a/chrome/browser/chromeos/login/users/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/users/user_manager_impl.cc
@@ -2014,18 +2014,15 @@ void UserManagerImpl::RestorePendingUserSessions() {
DCHECK(!user_already_logged_in);
if (!user_already_logged_in) {
+ UserContext user_context(user_id);
+ user_context.SetUserIDHash(user_id_hash);
+ user_context.SetIsUsingOAuth(false);
// Will call OnProfilePrepared() once profile has been loaded.
- LoginUtils::Get()->PrepareProfile(
- UserContext(user_id,
- std::string(), // password
- std::string(), // auth_code
- user_id_hash,
- false, // using_oauth
- UserContext::AUTH_FLOW_OFFLINE),
- std::string(), // display_email
- false, // has_cookies
- true, // has_active_session
- this);
+ LoginUtils::Get()->PrepareProfile(user_context,
+ std::string(), // display_email
+ false, // has_cookies
+ true, // has_active_session
+ this);
} else {
RestorePendingUserSessions();
}
« no previous file with comments | « chrome/browser/chromeos/login/users/user.cc ('k') | chrome/browser/chromeos/login/wizard_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698