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 // 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 challenges. | 9 // captcha challenges. |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // The password is valid but we need two factor to get a token. | 71 // The password is valid but we need two factor to get a token. |
72 TWO_FACTOR = 8, | 72 TWO_FACTOR = 8, |
73 | 73 |
74 // The requestor of the authentication step cancelled the request | 74 // The requestor of the authentication step cancelled the request |
75 // prior to completion. | 75 // prior to completion. |
76 REQUEST_CANCELED = 9, | 76 REQUEST_CANCELED = 9, |
77 | 77 |
78 // The user has provided a HOSTED account, when this service requires | 78 // The user has provided a HOSTED account, when this service requires |
79 // a GOOGLE account. | 79 // a GOOGLE account. |
80 HOSTED_NOT_ALLOWED = 10, | 80 HOSTED_NOT_ALLOWED = 10, |
81 | |
82 // Response format was unexpected. | |
83 UNEXPECTED_RESPONSE = 11, | |
84 }; | 81 }; |
85 | 82 |
86 // Additional data for CAPTCHA_REQUIRED errors. | 83 // Additional data for CAPTCHA_REQUIRED errors. |
87 struct Captcha { | 84 struct Captcha { |
88 Captcha(const std::string& t, const GURL& img, const GURL& unlock); | 85 Captcha(const std::string& t, const GURL& img, const GURL& unlock); |
89 std::string token; // Globally identifies the specific CAPTCHA challenge. | 86 std::string token; // Globally identifies the specific CAPTCHA challenge. |
90 GURL image_url; // The CAPTCHA image to show the user. | 87 GURL image_url; // The CAPTCHA image to show the user. |
91 GURL unlock_url; // Pretty unlock page containing above captcha. | 88 GURL unlock_url; // Pretty unlock page containing above captcha. |
92 }; | 89 }; |
93 | 90 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 GoogleServiceAuthError(State s, const std::string& captcha_token, | 124 GoogleServiceAuthError(State s, const std::string& captcha_token, |
128 const GURL& captcha_image_url, | 125 const GURL& captcha_image_url, |
129 const GURL& captcha_unlock_url); | 126 const GURL& captcha_unlock_url); |
130 | 127 |
131 State state_; | 128 State state_; |
132 Captcha captcha_; | 129 Captcha captcha_; |
133 int network_error_; | 130 int network_error_; |
134 }; | 131 }; |
135 | 132 |
136 #endif // CHROME_COMMON_NET_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_ | 133 #endif // CHROME_COMMON_NET_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_ |
OLD | NEW |