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

Unified Diff: chrome/browser/chromeos/login/signin/oauth2_login_manager.cc

Issue 1137253003: cros: Fix session restore on connection change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move PREPARE state setting to ContinueSessionRestore and cover it on connection change Created 5 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
« no previous file with comments | « chrome/browser/chromeos/login/signin/oauth2_login_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
index fb8742053720e7519fffdfe72b5c4bf943611dd4..890bd89ac1bf289dce49121aae4e8b281c0e8f79 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
+++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
@@ -72,11 +72,11 @@ void OAuth2LoginManager::RestoreSession(
refresh_token_ = oauth2_refresh_token;
oauthlogin_access_token_ = oauth2_access_token;
session_restore_start_ = base::Time::Now();
- SetSessionRestoreState(OAuth2LoginManager::SESSION_RESTORE_PREPARING);
ContinueSessionRestore();
}
void OAuth2LoginManager::ContinueSessionRestore() {
+ SetSessionRestoreState(OAuth2LoginManager::SESSION_RESTORE_PREPARING);
if (restore_strategy_ == RESTORE_FROM_COOKIE_JAR) {
FetchOAuth2Tokens();
return;
@@ -119,11 +119,15 @@ void OAuth2LoginManager::Stop() {
login_verifier_.reset();
}
-bool OAuth2LoginManager::ShouldBlockTabLoading() {
+bool OAuth2LoginManager::SessionRestoreIsRunning() const {
return state_ == SESSION_RESTORE_PREPARING ||
state_ == SESSION_RESTORE_IN_PROGRESS;
}
+bool OAuth2LoginManager::ShouldBlockTabLoading() const {
+ return SessionRestoreIsRunning();
+}
+
void OAuth2LoginManager::OnRefreshTokenAvailable(
const std::string& account_id) {
VLOG(1) << "OnRefreshTokenAvailable";
« no previous file with comments | « chrome/browser/chromeos/login/signin/oauth2_login_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698