| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 } | 745 } |
| 746 } | 746 } |
| 747 | 747 |
| 748 void UserSessionManager::RestoreAuthSessionImpl(Profile* profile, | 748 void UserSessionManager::RestoreAuthSessionImpl(Profile* profile, |
| 749 bool restore_from_auth_cookies) { | 749 bool restore_from_auth_cookies) { |
| 750 CHECK((authenticator_.get() && authenticator_->authentication_profile()) || | 750 CHECK((authenticator_.get() && authenticator_->authentication_profile()) || |
| 751 !restore_from_auth_cookies); | 751 !restore_from_auth_cookies); |
| 752 | 752 |
| 753 if (chrome::IsRunningInForcedAppMode() || | 753 if (chrome::IsRunningInForcedAppMode() || |
| 754 CommandLine::ForCurrentProcess()->HasSwitch( | 754 CommandLine::ForCurrentProcess()->HasSwitch( |
| 755 chromeos::switches::kOobeSkipPostLogin)) { | 755 chromeos::switches::kDisableGaiaServices)) { |
| 756 return; | 756 return; |
| 757 } | 757 } |
| 758 | 758 |
| 759 exit_after_session_restore_ = false; | 759 exit_after_session_restore_ = false; |
| 760 | 760 |
| 761 // Remove legacy OAuth1 token if we have one. If it's valid, we should already | 761 // Remove legacy OAuth1 token if we have one. If it's valid, we should already |
| 762 // have OAuth2 refresh token in OAuth2TokenService that could be used to | 762 // have OAuth2 refresh token in OAuth2TokenService that could be used to |
| 763 // retrieve all other tokens and user_context. | 763 // retrieve all other tokens and user_context. |
| 764 OAuth2LoginManager* login_manager = | 764 OAuth2LoginManager* login_manager = |
| 765 OAuth2LoginManagerFactory::GetInstance()->GetForProfile(profile); | 765 OAuth2LoginManagerFactory::GetInstance()->GetForProfile(profile); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 | 886 |
| 887 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() { | 887 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() { |
| 888 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 888 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 889 user_sessions_restored_ = true; | 889 user_sessions_restored_ = true; |
| 890 FOR_EACH_OBSERVER(UserSessionStateObserver, | 890 FOR_EACH_OBSERVER(UserSessionStateObserver, |
| 891 session_state_observer_list_, | 891 session_state_observer_list_, |
| 892 PendingUserSessionsRestoreFinished()); | 892 PendingUserSessionsRestoreFinished()); |
| 893 } | 893 } |
| 894 | 894 |
| 895 } // namespace chromeos | 895 } // namespace chromeos |
| OLD | NEW |