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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2752873002: Fix refresh token is not available after Chrome restart on crash. (Closed)
Patch Set: comment added Created 3 years, 9 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
« no previous file with comments | « no previous file | components/signin/core/browser/signin_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index abb9800fe02076957094ae59cd1ff309fa824b9d..dd2b4102c606c4243508222391d603a187440919 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -548,6 +548,12 @@ void UserSessionManager::RestoreAuthenticationSession(Profile* user_profile) {
const user_manager::User* user =
ProfileHelper::Get()->GetUserByProfile(user_profile);
+
+ const SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(user_profile);
+ if (!signin_manager || signin_manager->GetAuthenticatedAccountId().empty())
+ LOG(ERROR) << "No account is associated with sign-in manager on restore.";
msarda 2017/03/16 16:41:57 Suggestion: Consider adding a UMA histogram for th
khmel 2017/03/16 17:06:36 Nice point!
+
DCHECK(user);
if (!net::NetworkChangeNotifier::IsOffline()) {
pending_signin_restore_sessions_.erase(user->GetAccountId().GetUserEmail());
« no previous file with comments | « no previous file | components/signin/core/browser/signin_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698