| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/browser/chromeos/login/user_flow.h" | 11 #include "chrome/browser/chromeos/login/user_flow.h" |
| 12 | 12 |
| 13 class AccountId; |
| 14 |
| 13 // Handler for login flow initiazted by Easy Signin login attempt. | 15 // Handler for login flow initiazted by Easy Signin login attempt. |
| 14 // The only difference to the default login flow is hanlding of the auth | 16 // The only difference to the default login flow is hanlding of the auth |
| 15 // failure. | 17 // failure. |
| 16 class EasyUnlockUserLoginFlow : public chromeos::ExtendedUserFlow { | 18 class EasyUnlockUserLoginFlow : public chromeos::ExtendedUserFlow { |
| 17 public: | 19 public: |
| 18 explicit EasyUnlockUserLoginFlow(const std::string& user_id); | 20 explicit EasyUnlockUserLoginFlow(const AccountId& account_id); |
| 19 ~EasyUnlockUserLoginFlow() override; | 21 ~EasyUnlockUserLoginFlow() override; |
| 20 | 22 |
| 21 private: | 23 private: |
| 22 // chromeos::ExtendedUserFlow implementation. | 24 // chromeos::ExtendedUserFlow implementation. |
| 23 bool CanLockScreen() override; | 25 bool CanLockScreen() override; |
| 24 bool ShouldLaunchBrowser() override; | 26 bool ShouldLaunchBrowser() override; |
| 25 bool ShouldSkipPostLoginScreens() override; | 27 bool ShouldSkipPostLoginScreens() override; |
| 26 bool HandleLoginFailure(const chromeos::AuthFailure& failure) override; | 28 bool HandleLoginFailure(const chromeos::AuthFailure& failure) override; |
| 27 void HandleLoginSuccess(const chromeos::UserContext& context) override; | 29 void HandleLoginSuccess(const chromeos::UserContext& context) override; |
| 28 bool HandlePasswordChangeDetected() override; | 30 bool HandlePasswordChangeDetected() override; |
| 29 void HandleOAuthTokenStatusChange( | 31 void HandleOAuthTokenStatusChange( |
| 30 user_manager::User::OAuthTokenStatus status) override; | 32 user_manager::User::OAuthTokenStatus status) override; |
| 31 void LaunchExtraSteps(Profile* profile) override; | 33 void LaunchExtraSteps(Profile* profile) override; |
| 32 bool SupportsEarlyRestartToApplyFlags() override; | 34 bool SupportsEarlyRestartToApplyFlags() override; |
| 33 | 35 |
| 34 DISALLOW_COPY_AND_ASSIGN(EasyUnlockUserLoginFlow); | 36 DISALLOW_COPY_AND_ASSIGN(EasyUnlockUserLoginFlow); |
| 35 }; | 37 }; |
| 36 | 38 |
| 37 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW
_H_ | 39 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_USER_LOGIN_FLOW
_H_ |
| OLD | NEW |