Fix initial hiding and centering cursor on ChromeOS
[chromium-blink-merge.git] / chromeos / login / auth / test_attempt_state.cc
blob94004f5f13676fb6e95aaf52ea60d58d967d19a7
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
3 // found in the LICENSE file.
5 #include "chromeos/login/auth/test_attempt_state.h"
7 #include "components/user_manager/user_type.h"
9 namespace chromeos {
11 TestAttemptState::TestAttemptState(const UserContext& credentials,
12 const bool user_is_new)
13 : AuthAttemptState(credentials,
14 user_manager::USER_TYPE_REGULAR,
15 false, // unlock
16 false, // online_complete
17 user_is_new) {
20 TestAttemptState::~TestAttemptState() {
23 void TestAttemptState::PresetOnlineLoginStatus(const AuthFailure& outcome) {
24 online_complete_ = true;
25 online_outcome_ = outcome;
28 void TestAttemptState::DisableHosted() {
29 hosted_policy_ = GaiaAuthFetcher::HostedAccountsNotAllowed;
32 void TestAttemptState::PresetCryptohomeStatus(
33 bool cryptohome_outcome,
34 cryptohome::MountError cryptohome_code) {
35 cryptohome_complete_ = true;
36 cryptohome_outcome_ = cryptohome_outcome;
37 cryptohome_code_ = cryptohome_code;
40 bool TestAttemptState::online_complete() {
41 return online_complete_;
44 const AuthFailure& TestAttemptState::online_outcome() {
45 return online_outcome_;
48 bool TestAttemptState::is_first_time_user() {
49 return is_first_time_user_;
52 GaiaAuthFetcher::HostedAccountsSetting TestAttemptState::hosted_policy() {
53 return hosted_policy_;
56 bool TestAttemptState::cryptohome_complete() {
57 return cryptohome_complete_;
60 bool TestAttemptState::cryptohome_outcome() {
61 return cryptohome_outcome_;
64 cryptohome::MountError TestAttemptState::cryptohome_code() {
65 return cryptohome_code_;
68 } // namespace chromeos