OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/parallel_authenticator.h" | 5 #include "chrome/browser/chromeos/login/parallel_authenticator.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 ParallelAuthenticator::ParallelAuthenticator(LoginStatusConsumer* consumer) | 93 ParallelAuthenticator::ParallelAuthenticator(LoginStatusConsumer* consumer) |
94 : Authenticator(consumer), | 94 : Authenticator(consumer), |
95 already_reported_success_(false), | 95 already_reported_success_(false), |
96 checked_for_localaccount_(false), | 96 checked_for_localaccount_(false), |
97 using_oauth_( | 97 using_oauth_( |
98 CommandLine::ForCurrentProcess()->HasSwitch( | 98 CommandLine::ForCurrentProcess()->HasSwitch( |
99 switches::kWebUILogin) && | 99 switches::kWebUILogin) && |
100 !CommandLine::ForCurrentProcess()->HasSwitch( | 100 !CommandLine::ForCurrentProcess()->HasSwitch( |
101 switches::kSkipOAuthLogin)) { | 101 switches::kSkipOAuthLogin)) { |
102 CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded()); | |
103 // If not already owned, this is a no-op. If it is, this loads the owner's | 102 // If not already owned, this is a no-op. If it is, this loads the owner's |
104 // public key off of disk. | 103 // public key off of disk. |
105 OwnershipService::GetSharedInstance()->StartLoadOwnerKeyAttempt(); | 104 OwnershipService::GetSharedInstance()->StartLoadOwnerKeyAttempt(); |
106 } | 105 } |
107 | 106 |
108 ParallelAuthenticator::~ParallelAuthenticator() {} | 107 ParallelAuthenticator::~ParallelAuthenticator() {} |
109 | 108 |
110 void ParallelAuthenticator::AuthenticateToLogin( | 109 void ParallelAuthenticator::AuthenticateToLogin( |
111 Profile* profile, | 110 Profile* profile, |
112 const std::string& username, | 111 const std::string& username, |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 } | 774 } |
776 | 775 |
777 void ParallelAuthenticator::ResolveLoginCompletionStatus() { | 776 void ParallelAuthenticator::ResolveLoginCompletionStatus() { |
778 // Shortcut online state resolution process. | 777 // Shortcut online state resolution process. |
779 current_state_->RecordOnlineLoginStatus(GaiaAuthConsumer::ClientLoginResult(), | 778 current_state_->RecordOnlineLoginStatus(GaiaAuthConsumer::ClientLoginResult(), |
780 LoginFailure::None()); | 779 LoginFailure::None()); |
781 Resolve(); | 780 Resolve(); |
782 } | 781 } |
783 | 782 |
784 } // namespace chromeos | 783 } // namespace chromeos |
OLD | NEW |