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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const int ParallelAuthenticator::kLocalaccountRetryIntervalMs = 20; | 53 const int ParallelAuthenticator::kLocalaccountRetryIntervalMs = 20; |
54 | 54 |
55 const int kPassHashLen = 32; | 55 const int kPassHashLen = 32; |
56 | 56 |
57 ParallelAuthenticator::ParallelAuthenticator(LoginStatusConsumer* consumer) | 57 ParallelAuthenticator::ParallelAuthenticator(LoginStatusConsumer* consumer) |
58 : Authenticator(consumer), | 58 : Authenticator(consumer), |
59 already_reported_success_(false), | 59 already_reported_success_(false), |
60 checked_for_localaccount_(false), | 60 checked_for_localaccount_(false), |
61 using_oauth_( | 61 using_oauth_( |
62 CommandLine::ForCurrentProcess()->HasSwitch( | 62 CommandLine::ForCurrentProcess()->HasSwitch( |
63 switches::kWebUIGaiaLogin) && | 63 switches::kWebUILogin) && |
64 !CommandLine::ForCurrentProcess()->HasSwitch( | 64 !CommandLine::ForCurrentProcess()->HasSwitch( |
65 switches::kSkipOAuthLogin)) { | 65 switches::kSkipOAuthLogin)) { |
66 CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded()); | 66 CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded()); |
67 // If not already owned, this is a no-op. If it is, this loads the owner's | 67 // If not already owned, this is a no-op. If it is, this loads the owner's |
68 // public key off of disk. | 68 // public key off of disk. |
69 OwnershipService::GetSharedInstance()->StartLoadOwnerKeyAttempt(); | 69 OwnershipService::GetSharedInstance()->StartLoadOwnerKeyAttempt(); |
70 } | 70 } |
71 | 71 |
72 ParallelAuthenticator::~ParallelAuthenticator() {} | 72 ParallelAuthenticator::~ParallelAuthenticator() {} |
73 | 73 |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 } | 724 } |
725 | 725 |
726 void ParallelAuthenticator::ResolveLoginCompletionStatus() { | 726 void ParallelAuthenticator::ResolveLoginCompletionStatus() { |
727 // Shortcut online state resolution process. | 727 // Shortcut online state resolution process. |
728 current_state_->RecordOnlineLoginStatus(GaiaAuthConsumer::ClientLoginResult(), | 728 current_state_->RecordOnlineLoginStatus(GaiaAuthConsumer::ClientLoginResult(), |
729 LoginFailure::None()); | 729 LoginFailure::None()); |
730 Resolve(); | 730 Resolve(); |
731 } | 731 } |
732 | 732 |
733 } // namespace chromeos | 733 } // namespace chromeos |
OLD | NEW |