| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A GoogleServiceAuthError is immutable, plain old data representing an | 5 // A GoogleServiceAuthError is immutable, plain old data representing an |
| 6 // error from an attempt to authenticate with a Google service. | 6 // error from an attempt to authenticate with a Google service. |
| 7 // It could be from Google Accounts itself, or any service using Google | 7 // It could be from Google Accounts itself, or any service using Google |
| 8 // Accounts (e.g expired credentials). It may contain additional data such as | 8 // Accounts (e.g expired credentials). It may contain additional data such as |
| 9 // captcha or OTP challenges. | 9 // captcha or OTP challenges. |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // The password is valid but we need two factor to get a token. | 70 // The password is valid but we need two factor to get a token. |
| 71 TWO_FACTOR = 8, | 71 TWO_FACTOR = 8, |
| 72 | 72 |
| 73 // The requestor of the authentication step cancelled the request | 73 // The requestor of the authentication step cancelled the request |
| 74 // prior to completion. | 74 // prior to completion. |
| 75 REQUEST_CANCELED = 9, | 75 REQUEST_CANCELED = 9, |
| 76 | 76 |
| 77 // The user has provided a HOSTED account, when this service requires | 77 // The user has provided a HOSTED account, when this service requires |
| 78 // a GOOGLE account. | 78 // a GOOGLE account. |
| 79 HOSTED_NOT_ALLOWED = 10, | 79 HOSTED_NOT_ALLOWED = 10, |
| 80 |
| 81 // The number of known error states. |
| 82 NUM_STATES = 11, |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 // Additional data for CAPTCHA_REQUIRED errors. | 85 // Additional data for CAPTCHA_REQUIRED errors. |
| 83 struct Captcha { | 86 struct Captcha { |
| 84 Captcha(); | 87 Captcha(); |
| 85 Captcha(const std::string& token, | 88 Captcha(const std::string& token, |
| 86 const GURL& audio, | 89 const GURL& audio, |
| 87 const GURL& img, | 90 const GURL& img, |
| 88 const GURL& unlock, | 91 const GURL& unlock, |
| 89 int width, | 92 int width, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 int field_length); | 203 int field_length); |
| 201 | 204 |
| 202 State state_; | 205 State state_; |
| 203 Captcha captcha_; | 206 Captcha captcha_; |
| 204 SecondFactor second_factor_; | 207 SecondFactor second_factor_; |
| 205 int network_error_; | 208 int network_error_; |
| 206 std::string error_message_; | 209 std::string error_message_; |
| 207 }; | 210 }; |
| 208 | 211 |
| 209 #endif // GOOGLE_APIS_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_ | 212 #endif // GOOGLE_APIS_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_ |
| OLD | NEW |