OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LOGIN_PERFORMER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 // True if last login operation has timed out. | 109 // True if last login operation has timed out. |
110 bool login_timed_out() { | 110 bool login_timed_out() { |
111 return last_login_failure_.reason() == LoginFailure::LOGIN_TIMED_OUT; | 111 return last_login_failure_.reason() == LoginFailure::LOGIN_TIMED_OUT; |
112 } | 112 } |
113 | 113 |
114 void set_captcha(const std::string& captcha) { captcha_ = captcha; } | 114 void set_captcha(const std::string& captcha) { captcha_ = captcha; } |
115 void set_delegate(Delegate* delegate) { delegate_ = delegate; } | 115 void set_delegate(Delegate* delegate) { delegate_ = delegate; } |
116 | 116 |
117 private: | |
118 | |
119 typedef enum AuthorizationMode { | 117 typedef enum AuthorizationMode { |
120 // Authorization performed internally by Chrome. | 118 // Authorization performed internally by Chrome. |
121 AUTH_MODE_INTERNAL, | 119 AUTH_MODE_INTERNAL, |
122 // Authorization performed by an extension. | 120 // Authorization performed by an extension. |
123 AUTH_MODE_EXTENSION | 121 AUTH_MODE_EXTENSION |
124 } AuthorizationMode; | 122 } AuthorizationMode; |
| 123 AuthorizationMode auth_mode() const { return auth_mode_; } |
125 | 124 |
| 125 private: |
126 // NotificationObserver implementation: | 126 // NotificationObserver implementation: |
127 virtual void Observe(int type, | 127 virtual void Observe(int type, |
128 const NotificationSource& source, | 128 const NotificationSource& source, |
129 const NotificationDetails& details) OVERRIDE; | 129 const NotificationDetails& details) OVERRIDE; |
130 | 130 |
131 // SignedSettingsHelper::Callback implementation: | 131 // SignedSettingsHelper::Callback implementation: |
132 virtual void OnCheckWhitelistCompleted(SignedSettings::ReturnCode code, | 132 virtual void OnCheckWhitelistCompleted(SignedSettings::ReturnCode code, |
133 const std::string& email) OVERRIDE; | 133 const std::string& email) OVERRIDE; |
134 | 134 |
135 // ProfileManagerObserver implementation: | 135 // ProfileManagerObserver implementation: |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 bool using_oauth_; | 213 bool using_oauth_; |
214 | 214 |
215 ScopedRunnableMethodFactory<LoginPerformer> method_factory_; | 215 ScopedRunnableMethodFactory<LoginPerformer> method_factory_; |
216 | 216 |
217 DISALLOW_COPY_AND_ASSIGN(LoginPerformer); | 217 DISALLOW_COPY_AND_ASSIGN(LoginPerformer); |
218 }; | 218 }; |
219 | 219 |
220 } // namespace chromeos | 220 } // namespace chromeos |
221 | 221 |
222 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_ | 222 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_ |
OLD | NEW |