blob: b07e498cf9b23aea0a1e1411ba699a3bb2b1a679 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW_H_
#include <string>
#include "base/macros.h"
#include "chrome/browser/chromeos/login/user_flow.h"
// Handler for login flow initiazted by Easy Signin login attempt.
// The only difference to the default login flow is hanlding of the auth
// failure.
class EasyUnlockUserLoginFlow : public chromeos::ExtendedUserFlow {
public:
explicit EasyUnlockUserLoginFlow(const std::string& user_id);
virtual ~EasyUnlockUserLoginFlow();
private:
// chromeos::ExtendedUserFlow implementation.
virtual bool CanLockScreen() override;
virtual bool ShouldLaunchBrowser() override;
virtual bool ShouldSkipPostLoginScreens() override;
virtual bool HandleLoginFailure(
const chromeos::AuthFailure& failure) override;
virtual void HandleLoginSuccess(
const chromeos::UserContext& context) override;
virtual bool HandlePasswordChangeDetected() override;
virtual void HandleOAuthTokenStatusChange(
user_manager::User::OAuthTokenStatus status) override;
virtual void LaunchExtraSteps(Profile* profile) override;
virtual bool SupportsEarlyRestartToApplyFlags() override;
DISALLOW_COPY_AND_ASSIGN(EasyUnlockUserLoginFlow);
};
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW_H_