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

Side by Side Diff: chromeos/login/auth/cryptohome_authenticator.cc

Issue 2498613003: Add ARC++ kiosk menu items and ability to start kiosk session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 1 month 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 "chromeos/login/auth/cryptohome_authenticator.h" 5 #include "chromeos/login/auth/cryptohome_authenticator.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 MountPublic(current_state_->AsWeakPtr(), 602 MountPublic(current_state_->AsWeakPtr(),
603 scoped_refptr<CryptohomeAuthenticator>(this), 603 scoped_refptr<CryptohomeAuthenticator>(this),
604 cryptohome::CREATE_IF_MISSING); 604 cryptohome::CREATE_IF_MISSING);
605 } else { 605 } else {
606 ephemeral_mount_attempted_ = true; 606 ephemeral_mount_attempted_ = true;
607 MountGuestAndGetHash(current_state_->AsWeakPtr(), 607 MountGuestAndGetHash(current_state_->AsWeakPtr(),
608 scoped_refptr<CryptohomeAuthenticator>(this)); 608 scoped_refptr<CryptohomeAuthenticator>(this));
609 } 609 }
610 } 610 }
611 611
612 void CryptohomeAuthenticator::LoginAsArcKioskAccount(
613 const AccountId& app_account_id) {
614 DCHECK(task_runner_->RunsTasksOnCurrentThread());
615
616 current_state_.reset(new AuthAttemptState(
617 UserContext(user_manager::USER_TYPE_ARC_KIOSK_APP, app_account_id),
618 false, // unlock
619 false, // online_complete
620 false)); // user_is_new
621
622 remove_user_data_on_failure_ = true;
623 MountPublic(current_state_->AsWeakPtr(),
624 scoped_refptr<CryptohomeAuthenticator>(this),
625 cryptohome::CREATE_IF_MISSING);
626 }
627
612 void CryptohomeAuthenticator::OnAuthSuccess() { 628 void CryptohomeAuthenticator::OnAuthSuccess() {
613 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 629 DCHECK(task_runner_->RunsTasksOnCurrentThread());
614 VLOG(1) << "Login success"; 630 VLOG(1) << "Login success";
615 // Send notification of success 631 // Send notification of success
616 chromeos::LoginEventRecorder::Get()->RecordAuthenticationSuccess(); 632 chromeos::LoginEventRecorder::Get()->RecordAuthenticationSuccess();
617 { 633 {
618 base::AutoLock for_this_block(success_lock_); 634 base::AutoLock for_this_block(success_lock_);
619 already_reported_success_ = true; 635 already_reported_success_ = true;
620 } 636 }
621 if (consumer_) 637 if (consumer_)
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 Resolve(); 997 Resolve();
982 } 998 }
983 999
984 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, 1000 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished,
985 bool check_result) { 1001 bool check_result) {
986 owner_is_verified_ = owner_check_finished; 1002 owner_is_verified_ = owner_check_finished;
987 user_can_login_ = check_result; 1003 user_can_login_ = check_result;
988 } 1004 }
989 1005
990 } // namespace chromeos 1006 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698