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/auth/chrome_login_performer.h" | 5 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_user_login_flow.
h" | 10 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_user_login_flow.
h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 UserContext ChromeLoginPerformer::TransformSupervisedKey( | 129 UserContext ChromeLoginPerformer::TransformSupervisedKey( |
130 const UserContext& context) { | 130 const UserContext& context) { |
131 SupervisedUserAuthentication* authentication = | 131 SupervisedUserAuthentication* authentication = |
132 ChromeUserManager::Get()->GetSupervisedUserManager()->GetAuthentication(); | 132 ChromeUserManager::Get()->GetSupervisedUserManager()->GetAuthentication(); |
133 return authentication->TransformKey(context); | 133 return authentication->TransformKey(context); |
134 } | 134 } |
135 | 135 |
136 void ChromeLoginPerformer::SetupSupervisedUserFlow(const std::string& user_id) { | 136 void ChromeLoginPerformer::SetupSupervisedUserFlow(const std::string& user_id) { |
137 SupervisedUserLoginFlow* new_flow = new SupervisedUserLoginFlow(user_id); | 137 SupervisedUserLoginFlow* new_flow = new SupervisedUserLoginFlow(user_id); |
138 new_flow->set_host(ChromeUserManager::Get()->GetUserFlow(user_id)->host()); | 138 new_flow->SetHost(ChromeUserManager::Get()->GetUserFlow(user_id)->host()); |
139 ChromeUserManager::Get()->SetUserFlow(user_id, new_flow); | 139 ChromeUserManager::Get()->SetUserFlow(user_id, new_flow); |
140 } | 140 } |
141 | 141 |
142 void ChromeLoginPerformer::SetupEasyUnlockUserFlow(const std::string& user_id) { | 142 void ChromeLoginPerformer::SetupEasyUnlockUserFlow(const std::string& user_id) { |
143 ChromeUserManager::Get()->SetUserFlow(user_id, | 143 ChromeUserManager::Get()->SetUserFlow(user_id, |
144 new EasyUnlockUserLoginFlow(user_id)); | 144 new EasyUnlockUserLoginFlow(user_id)); |
145 } | 145 } |
146 | 146 |
147 bool ChromeLoginPerformer::CheckPolicyForUser(const std::string& user_id) { | 147 bool ChromeLoginPerformer::CheckPolicyForUser(const std::string& user_id) { |
148 // Login is not allowed if policy could not be loaded for the account. | 148 // Login is not allowed if policy could not be loaded for the account. |
(...skipping 19 matching lines...) Expand all Loading... |
168 const base::Closure& failure_callback, | 168 const base::Closure& failure_callback, |
169 policy::WildcardLoginChecker::Result result) { | 169 policy::WildcardLoginChecker::Result result) { |
170 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) { | 170 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) { |
171 success_callback.Run(); | 171 success_callback.Run(); |
172 } else { | 172 } else { |
173 failure_callback.Run(); | 173 failure_callback.Run(); |
174 } | 174 } |
175 } | 175 } |
176 | 176 |
177 } // namespace chromeos | 177 } // namespace chromeos |
OLD | NEW |