| 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 CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ | 5 #ifndef CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ |
| 6 #define CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ | 6 #define CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Initiates login into the public account identified by |user_context|. | 58 // Initiates login into the public account identified by |user_context|. |
| 59 virtual void LoginAsPublicSession(const UserContext& user_context) = 0; | 59 virtual void LoginAsPublicSession(const UserContext& user_context) = 0; |
| 60 | 60 |
| 61 // Initiates login into kiosk mode account identified by |app_account_id|. | 61 // Initiates login into kiosk mode account identified by |app_account_id|. |
| 62 // The |app_account_id| is a generated account id for the account. | 62 // The |app_account_id| is a generated account id for the account. |
| 63 // |use_guest_mount| specifies whether to force the session to use a | 63 // |use_guest_mount| specifies whether to force the session to use a |
| 64 // guest mount. If this is false, we use mount a public cryptohome. | 64 // guest mount. If this is false, we use mount a public cryptohome. |
| 65 virtual void LoginAsKioskAccount(const AccountId& app_account_id, | 65 virtual void LoginAsKioskAccount(const AccountId& app_account_id, |
| 66 bool use_guest_mount) = 0; | 66 bool use_guest_mount) = 0; |
| 67 | 67 |
| 68 // Initiates login into ARC kiosk mode account identified by |app_account_id|. |
| 69 // The |app_account_id| is a generated account id for the account. |
| 70 // ARC kiosk mode mounts a public cryptohome. |
| 71 virtual void LoginAsArcKioskAccount(const AccountId& app_account_id) = 0; |
| 72 |
| 68 // Notifies caller that login was successful. Must be called on the UI thread. | 73 // Notifies caller that login was successful. Must be called on the UI thread. |
| 69 virtual void OnAuthSuccess() = 0; | 74 virtual void OnAuthSuccess() = 0; |
| 70 | 75 |
| 71 // Must be called on the UI thread. | 76 // Must be called on the UI thread. |
| 72 virtual void OnAuthFailure(const AuthFailure& error) = 0; | 77 virtual void OnAuthFailure(const AuthFailure& error) = 0; |
| 73 | 78 |
| 74 // Call these methods on the UI thread. | 79 // Call these methods on the UI thread. |
| 75 // If a password logs the user in online, but cannot be used to | 80 // If a password logs the user in online, but cannot be used to |
| 76 // mount their cryptohome, we expect that a password change has | 81 // mount their cryptohome, we expect that a password change has |
| 77 // occurred. | 82 // occurred. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 101 | 106 |
| 102 private: | 107 private: |
| 103 friend class base::RefCountedThreadSafe<Authenticator>; | 108 friend class base::RefCountedThreadSafe<Authenticator>; |
| 104 | 109 |
| 105 DISALLOW_COPY_AND_ASSIGN(Authenticator); | 110 DISALLOW_COPY_AND_ASSIGN(Authenticator); |
| 106 }; | 111 }; |
| 107 | 112 |
| 108 } // namespace chromeos | 113 } // namespace chromeos |
| 109 | 114 |
| 110 #endif // CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ | 115 #endif // CHROMEOS_LOGIN_AUTH_AUTHENTICATOR_H_ |
| OLD | NEW |