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

Side by Side Diff: google_apis/gaia/google_service_auth_error.h

Issue 12686006: Rename GoogleServiceAuthError::None() to AuthErrorNone() and LoginFailure::None() to LoginFailureNo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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) 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 const std::string& alternate_text, 161 const std::string& alternate_text,
162 int field_length); 162 int field_length);
163 163
164 // Construct an INVALID_GAIA_CREDENTIALS error from a ClientOAuth response. 164 // Construct an INVALID_GAIA_CREDENTIALS error from a ClientOAuth response.
165 // |data| is the JSON response from the server explaning the error. 165 // |data| is the JSON response from the server explaning the error.
166 static GoogleServiceAuthError FromClientOAuthError(const std::string& data); 166 static GoogleServiceAuthError FromClientOAuthError(const std::string& data);
167 167
168 // Provided for convenience for clients needing to reset an instance to NONE. 168 // Provided for convenience for clients needing to reset an instance to NONE.
169 // (avoids err_ = GoogleServiceAuthError(GoogleServiceAuthError::NONE), due 169 // (avoids err_ = GoogleServiceAuthError(GoogleServiceAuthError::NONE), due
170 // to explicit class and State enum relation. Note: shouldn't be inlined! 170 // to explicit class and State enum relation. Note: shouldn't be inlined!
171 static GoogleServiceAuthError None(); 171 static GoogleServiceAuthError AuthErrorNone();
172 172
173 // The error information. 173 // The error information.
174 State state() const; 174 State state() const;
175 const Captcha& captcha() const; 175 const Captcha& captcha() const;
176 const SecondFactor& second_factor() const; 176 const SecondFactor& second_factor() const;
177 int network_error() const; 177 int network_error() const;
178 const std::string& token() const; 178 const std::string& token() const;
179 const std::string& error_message() const; 179 const std::string& error_message() const;
180 180
181 // Returns info about this object in a dictionary. Caller takes 181 // Returns info about this object in a dictionary. Caller takes
(...skipping 21 matching lines...) Expand all
203 int field_length); 203 int field_length);
204 204
205 State state_; 205 State state_;
206 Captcha captcha_; 206 Captcha captcha_;
207 SecondFactor second_factor_; 207 SecondFactor second_factor_;
208 int network_error_; 208 int network_error_;
209 std::string error_message_; 209 std::string error_message_;
210 }; 210 };
211 211
212 #endif // GOOGLE_APIS_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_ 212 #endif // GOOGLE_APIS_GAIA_GOOGLE_SERVICE_AUTH_ERROR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler_unittest.cc ('k') | google_apis/gaia/google_service_auth_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698