OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 remove_user_data_on_failure_ = false; | 339 remove_user_data_on_failure_ = false; |
340 ephemeral_mount_attempted_ = true; | 340 ephemeral_mount_attempted_ = true; |
341 SystemSaltGetter::Get()->GetSystemSalt( | 341 SystemSaltGetter::Get()->GetSystemSalt( |
342 base::Bind(&Mount, | 342 base::Bind(&Mount, |
343 current_state_.get(), | 343 current_state_.get(), |
344 scoped_refptr<ParallelAuthenticator>(this), | 344 scoped_refptr<ParallelAuthenticator>(this), |
345 cryptohome::CREATE_IF_MISSING | cryptohome::ENSURE_EPHEMERAL)); | 345 cryptohome::CREATE_IF_MISSING | cryptohome::ENSURE_EPHEMERAL)); |
346 } | 346 } |
347 | 347 |
348 void ParallelAuthenticator::LoginAsKioskAccount( | 348 void ParallelAuthenticator::LoginAsKioskAccount( |
349 const std::string& app_user_id, bool force_ephemeral) { | 349 const std::string& app_user_id, bool force_guest) { |
bartfab (slow)
2014/03/20 13:22:29
Nit: Put each argument on a separate line.
rkc
2014/03/20 21:45:01
Done.
| |
350 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 350 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
351 | 351 |
352 std::string user_id = | 352 const std::string user_id = |
353 force_ephemeral ? UserManager::kGuestUserName : app_user_id; | 353 force_guest ? UserManager::kGuestUserName : app_user_id; |
354 current_state_.reset(new AuthAttemptState( | 354 current_state_.reset(new AuthAttemptState( |
355 UserContext(user_id, | 355 UserContext(user_id, |
356 std::string(), // password | 356 std::string(), // password |
357 std::string()), // auth_code | 357 std::string()), // auth_code |
358 std::string(), // login_token | 358 std::string(), // login_token |
359 std::string(), // login_captcha | 359 std::string(), // login_captcha |
360 User::USER_TYPE_KIOSK_APP, | 360 User::USER_TYPE_KIOSK_APP, |
361 false)); | 361 false)); |
362 | 362 |
363 remove_user_data_on_failure_ = true; | 363 remove_user_data_on_failure_ = true; |
364 if (!force_ephemeral) { | 364 if (!force_guest) { |
365 MountPublic(current_state_.get(), | 365 MountPublic(current_state_.get(), |
366 scoped_refptr<ParallelAuthenticator>(this), | 366 scoped_refptr<ParallelAuthenticator>(this), |
367 cryptohome::CREATE_IF_MISSING); | 367 cryptohome::CREATE_IF_MISSING); |
368 } else { | 368 } else { |
369 ephemeral_mount_attempted_ = true; | 369 ephemeral_mount_attempted_ = true; |
370 MountGuest(current_state_.get(), | 370 MountGuest(current_state_.get(), |
371 scoped_refptr<ParallelAuthenticator>(this)); | 371 scoped_refptr<ParallelAuthenticator>(this)); |
372 } | 372 } |
373 } | 373 } |
374 | 374 |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
816 Resolve(); | 816 Resolve(); |
817 } | 817 } |
818 | 818 |
819 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, | 819 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, |
820 bool check_result) { | 820 bool check_result) { |
821 owner_is_verified_ = owner_check_finished; | 821 owner_is_verified_ = owner_check_finished; |
822 user_can_login_ = check_result; | 822 user_can_login_ = check_result; |
823 } | 823 } |
824 | 824 |
825 } // namespace chromeos | 825 } // namespace chromeos |
OLD | NEW |