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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 } | 689 } |
690 } | 690 } |
691 | 691 |
692 void UserSessionManager::RestoreAuthSessionImpl(Profile* profile, | 692 void UserSessionManager::RestoreAuthSessionImpl(Profile* profile, |
693 bool restore_from_auth_cookies) { | 693 bool restore_from_auth_cookies) { |
694 CHECK((authenticator_.get() && authenticator_->authentication_profile()) || | 694 CHECK((authenticator_.get() && authenticator_->authentication_profile()) || |
695 !restore_from_auth_cookies); | 695 !restore_from_auth_cookies); |
696 | 696 |
697 if (chrome::IsRunningInForcedAppMode() || | 697 if (chrome::IsRunningInForcedAppMode() || |
698 CommandLine::ForCurrentProcess()->HasSwitch( | 698 CommandLine::ForCurrentProcess()->HasSwitch( |
699 chromeos::switches::kOobeSkipPostLogin)) { | 699 chromeos::switches::kDisableSessionRestore)) { |
700 return; | 700 return; |
701 } | 701 } |
702 | 702 |
703 exit_after_session_restore_ = false; | 703 exit_after_session_restore_ = false; |
704 | 704 |
705 // Remove legacy OAuth1 token if we have one. If it's valid, we should already | 705 // Remove legacy OAuth1 token if we have one. If it's valid, we should already |
706 // have OAuth2 refresh token in OAuth2TokenService that could be used to | 706 // have OAuth2 refresh token in OAuth2TokenService that could be used to |
707 // retrieve all other tokens and user_context. | 707 // retrieve all other tokens and user_context. |
708 OAuth2LoginManager* login_manager = | 708 OAuth2LoginManager* login_manager = |
709 OAuth2LoginManagerFactory::GetInstance()->GetForProfile(profile); | 709 OAuth2LoginManagerFactory::GetInstance()->GetForProfile(profile); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 primary_user && | 751 primary_user && |
752 profile == ProfileHelper::Get()->GetProfileByUser(primary_user) && | 752 profile == ProfileHelper::Get()->GetProfileByUser(primary_user) && |
753 CertLoader::IsInitialized() && | 753 CertLoader::IsInitialized() && |
754 base::SysInfo::IsRunningOnChromeOS()) { | 754 base::SysInfo::IsRunningOnChromeOS()) { |
755 GetNSSCertDatabaseForProfile(profile, | 755 GetNSSCertDatabaseForProfile(profile, |
756 base::Bind(&OnGetNSSCertDatabaseForUser)); | 756 base::Bind(&OnGetNSSCertDatabaseForUser)); |
757 } | 757 } |
758 } | 758 } |
759 | 759 |
760 } // namespace chromeos | 760 } // namespace chromeos |
OLD | NEW |