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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 session_restore_strategy_ = | 1320 session_restore_strategy_ = |
1321 OAuth2LoginManager::RESTORE_FROM_SAVED_OAUTH2_REFRESH_TOKEN; | 1321 OAuth2LoginManager::RESTORE_FROM_SAVED_OAUTH2_REFRESH_TOKEN; |
1322 } | 1322 } |
1323 } | 1323 } |
1324 | 1324 |
1325 void UserSessionManager::RestoreAuthSessionImpl( | 1325 void UserSessionManager::RestoreAuthSessionImpl( |
1326 Profile* profile, | 1326 Profile* profile, |
1327 bool restore_from_auth_cookies) { | 1327 bool restore_from_auth_cookies) { |
1328 CHECK((authenticator_.get() && authenticator_->authentication_context()) || | 1328 CHECK((authenticator_.get() && authenticator_->authentication_context()) || |
1329 !restore_from_auth_cookies); | 1329 !restore_from_auth_cookies); |
1330 | |
1331 if (chrome::IsRunningInForcedAppMode() || | 1330 if (chrome::IsRunningInForcedAppMode() || |
1332 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1331 base::CommandLine::ForCurrentProcess()->HasSwitch( |
1333 chromeos::switches::kDisableGaiaServices)) { | 1332 chromeos::switches::kDisableGaiaServices)) { |
1334 return; | 1333 return; |
1335 } | 1334 } |
1336 | 1335 |
1337 exit_after_session_restore_ = false; | 1336 exit_after_session_restore_ = false; |
1338 | 1337 |
1339 // Remove legacy OAuth1 token if we have one. If it's valid, we should already | 1338 // Remove legacy OAuth1 token if we have one. If it's valid, we should already |
1340 // have OAuth2 refresh token in OAuth2TokenService that could be used to | 1339 // have OAuth2 refresh token in OAuth2TokenService that could be used to |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1871 ->browser_policy_connector_chromeos() | 1870 ->browser_policy_connector_chromeos() |
1872 ->IsEnterpriseManaged()) { | 1871 ->IsEnterpriseManaged()) { |
1873 return false; | 1872 return false; |
1874 } | 1873 } |
1875 | 1874 |
1876 // Do not show end of life notification if this is a guest session | 1875 // Do not show end of life notification if this is a guest session |
1877 return !profile->IsGuestSession(); | 1876 return !profile->IsGuestSession(); |
1878 } | 1877 } |
1879 | 1878 |
1880 } // namespace chromeos | 1879 } // namespace chromeos |
OLD | NEW |