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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 15929005: [CrOS multi-profiles] Restore user sessions after crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 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/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 93883cdae13f730d5adedb6c2057aa8d7d6f033a..6bfcb61bf86a97e69318344b8c88b1dd6857894f 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -146,6 +146,7 @@ class LoginUtilsImpl
const std::string& display_email,
bool using_oauth,
bool has_cookies,
+ bool has_active_session,
LoginUtils::Delegate* delegate) OVERRIDE;
virtual void DelegateDeleted(LoginUtils::Delegate* delegate) OVERRIDE;
virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE;
@@ -320,15 +321,18 @@ void LoginUtilsImpl::PrepareProfile(
const std::string& display_email,
bool using_oauth,
bool has_cookies,
+ bool has_active_session,
LoginUtils::Delegate* delegate) {
BootTimesLoader* btl = BootTimesLoader::Get();
VLOG(1) << "Completing login for " << user_context.username;
- btl->AddLoginTimeMarker("StartSession-Start", false);
- DBusThreadManager::Get()->GetSessionManagerClient()->StartSession(
- user_context.username);
- btl->AddLoginTimeMarker("StartSession-End", false);
+ if (!has_active_session) {
+ btl->AddLoginTimeMarker("StartSession-Start", false);
+ DBusThreadManager::Get()->GetSessionManagerClient()->StartSession(
+ user_context.username);
+ btl->AddLoginTimeMarker("StartSession-End", false);
+ }
btl->AddLoginTimeMarker("UserLoggedIn-Start", false);
UserManager* user_manager = UserManager::Get();
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.h ('k') | chrome/browser/chromeos/login/login_utils_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698