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

Unified Diff: components/signin/core/browser/signin_manager_base.cc

Issue 2752873002: Fix refresh token is not available after Chrome restart on crash. (Closed)
Patch Set: alternative solution 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
Index: components/signin/core/browser/signin_manager_base.cc
diff --git a/components/signin/core/browser/signin_manager_base.cc b/components/signin/core/browser/signin_manager_base.cc
index 68d68b477b4334edc4d004773f9daa798cc5621d..d0e55b7c61fdf433a87406cb5c7d57c9c91c1be3 100644
--- a/components/signin/core/browser/signin_manager_base.cc
+++ b/components/signin/core/browser/signin_manager_base.cc
@@ -216,6 +216,8 @@ void SigninManagerBase::SetAuthenticatedAccountId(
account_id);
client_->GetPrefs()->SetString(prefs::kGoogleServicesLastUsername,
info.email);
+
+ client_->GetPrefs()->CommitPendingWrite();
xiyuan 2017/03/16 15:59:02 nit: Let's add a comment of why this is needed, e
khmel 2017/03/16 16:19:43 Thanks, done
}
bool SigninManagerBase::IsAuthenticated() const {

Powered by Google App Engine
This is Rietveld 408576698