| 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_AUTH_STATUS_CONSUMER_H_ | 5 #ifndef CHROMEOS_LOGIN_AUTH_AUTH_STATUS_CONSUMER_H_ |
| 6 #define CHROMEOS_LOGIN_AUTH_AUTH_STATUS_CONSUMER_H_ | 6 #define CHROMEOS_LOGIN_AUTH_AUTH_STATUS_CONSUMER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // An interface that defines the callbacks for objects that the | 105 // An interface that defines the callbacks for objects that the |
| 106 // Authenticator class will call to report the success/failure of | 106 // Authenticator class will call to report the success/failure of |
| 107 // authentication for Chromium OS. | 107 // authentication for Chromium OS. |
| 108 class CHROMEOS_EXPORT AuthStatusConsumer { | 108 class CHROMEOS_EXPORT AuthStatusConsumer { |
| 109 public: | 109 public: |
| 110 virtual ~AuthStatusConsumer() {} | 110 virtual ~AuthStatusConsumer() {} |
| 111 // The current login attempt has ended in failure, with error |error|. | 111 // The current login attempt has ended in failure, with error |error|. |
| 112 virtual void OnAuthFailure(const AuthFailure& error) = 0; | 112 virtual void OnAuthFailure(const AuthFailure& error) = 0; |
| 113 | 113 |
| 114 // The current retail mode login attempt has succeeded. | |
| 115 // Unless overridden for special processing, this should always call | |
| 116 // OnLoginSuccess with the magic |kRetailModeUserEMail| constant. | |
| 117 virtual void OnRetailModeAuthSuccess(const UserContext& user_context); | |
| 118 // The current login attempt has succeeded for |user_context|. | 114 // The current login attempt has succeeded for |user_context|. |
| 119 virtual void OnAuthSuccess(const UserContext& user_context) = 0; | 115 virtual void OnAuthSuccess(const UserContext& user_context) = 0; |
| 120 // The current guest login attempt has succeeded. | 116 // The current guest login attempt has succeeded. |
| 121 virtual void OnOffTheRecordAuthSuccess() {} | 117 virtual void OnOffTheRecordAuthSuccess() {} |
| 122 // The same password didn't work both online and offline. | 118 // The same password didn't work both online and offline. |
| 123 virtual void OnPasswordChangeDetected(); | 119 virtual void OnPasswordChangeDetected(); |
| 124 }; | 120 }; |
| 125 | 121 |
| 126 } // namespace chromeos | 122 } // namespace chromeos |
| 127 | 123 |
| 128 #endif // CHROMEOS_LOGIN_AUTH_AUTH_STATUS_CONSUMER_H_ | 124 #endif // CHROMEOS_LOGIN_AUTH_AUTH_STATUS_CONSUMER_H_ |
| OLD | NEW |