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 "chrome/browser/chromeos/login/easy_unlock/easy_unlock_user_login_flow.h"
7 #include "chrome/browser/chromeos/profiles/profile_helper.h"
8 #include "chrome/browser/signin/easy_unlock_service.h"
10 EasyUnlockUserLoginFlow::EasyUnlockUserLoginFlow(const std::string
& user_id
)
11 : chromeos::ExtendedUserFlow(user_id
) {
14 EasyUnlockUserLoginFlow::~EasyUnlockUserLoginFlow() {}
16 bool EasyUnlockUserLoginFlow::CanLockScreen() {
20 bool EasyUnlockUserLoginFlow::ShouldLaunchBrowser() {
24 bool EasyUnlockUserLoginFlow::ShouldSkipPostLoginScreens() {
28 bool EasyUnlockUserLoginFlow::HandleLoginFailure(
29 const chromeos::AuthFailure
& failure
) {
30 Profile
* profile
= chromeos::ProfileHelper::GetSigninProfile();
31 EasyUnlockService
* service
= EasyUnlockService::Get(profile
);
34 service
->HandleAuthFailure(user_id());
35 service
->RecordEasySignInOutcome(user_id(), false);
40 void EasyUnlockUserLoginFlow::HandleLoginSuccess(
41 const chromeos::UserContext
& context
) {
42 Profile
* profile
= chromeos::ProfileHelper::GetSigninProfile();
43 EasyUnlockService
* service
= EasyUnlockService::Get(profile
);
46 service
->RecordEasySignInOutcome(user_id(), true);
49 bool EasyUnlockUserLoginFlow::HandlePasswordChangeDetected() {
53 void EasyUnlockUserLoginFlow::HandleOAuthTokenStatusChange(
54 user_manager::User::OAuthTokenStatus status
) {
57 void EasyUnlockUserLoginFlow::LaunchExtraSteps(Profile
* profile
) {
60 bool EasyUnlockUserLoginFlow::SupportsEarlyRestartToApplyFlags() {