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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 384973004: Introduce disable-gaia-services for fake telemetry login. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698