Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/common/net/gaia/google_service_auth_error.h

Issue 8632005: Part 1 of work to do user sign in based on OAuth2: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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,
81 }; 84 };
82 85
83 // Additional data for CAPTCHA_REQUIRED errors. 86 // Additional data for CAPTCHA_REQUIRED errors.
84 struct Captcha { 87 struct Captcha {
85 Captcha(const std::string& t, const GURL& img, const GURL& unlock); 88 Captcha(const std::string& t, const GURL& img, const GURL& unlock);
86 std::string token; // Globally identifies the specific CAPTCHA challenge. 89 std::string token; // Globally identifies the specific CAPTCHA challenge.
87 GURL image_url; // The CAPTCHA image to show the user. 90 GURL image_url; // The CAPTCHA image to show the user.
88 GURL unlock_url; // Pretty unlock page containing above captcha. 91 GURL unlock_url; // Pretty unlock page containing above captcha.
89 }; 92 };
90 93
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 GoogleServiceAuthError(State s, const std::string& captcha_token, 127 GoogleServiceAuthError(State s, const std::string& captcha_token,
125 const GURL& captcha_image_url, 128 const GURL& captcha_image_url,
126 const GURL& captcha_unlock_url); 129 const GURL& captcha_unlock_url);
127 130
128 State state_; 131 State state_;
129 Captcha captcha_; 132 Captcha captcha_;
130 int network_error_; 133 int network_error_;
131 }; 134 };
132 135
133 #endif // CHROME_COMMON_NET_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_ 136 #endif // CHROME_COMMON_NET_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698