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 #include "google_apis/gaia/google_service_auth_error.h" | 5 #include "google_apis/gaia/google_service_auth_error.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 return GoogleServiceAuthError(CONNECTION_FAILED, 0); | 132 return GoogleServiceAuthError(CONNECTION_FAILED, 0); |
133 | 133 |
134 // The explanation field is optional. | 134 // The explanation field is optional. |
135 std::string explanation; | 135 std::string explanation; |
136 if (!dict->GetStringWithoutPathExpansion("explanation", &explanation)) | 136 if (!dict->GetStringWithoutPathExpansion("explanation", &explanation)) |
137 explanation.clear(); | 137 explanation.clear(); |
138 | 138 |
139 return GoogleServiceAuthError(explanation); | 139 return GoogleServiceAuthError(explanation); |
140 } | 140 } |
141 | 141 |
142 GoogleServiceAuthError GoogleServiceAuthError::None() { | 142 GoogleServiceAuthError GoogleServiceAuthError::AuthErrorNone() { |
143 return GoogleServiceAuthError(NONE); | 143 return GoogleServiceAuthError(NONE); |
144 } | 144 } |
145 | 145 |
146 GoogleServiceAuthError::State GoogleServiceAuthError::state() const { | 146 GoogleServiceAuthError::State GoogleServiceAuthError::state() const { |
147 return state_; | 147 return state_; |
148 } | 148 } |
149 | 149 |
150 const GoogleServiceAuthError::Captcha& GoogleServiceAuthError::captcha() const { | 150 const GoogleServiceAuthError::Captcha& GoogleServiceAuthError::captcha() const { |
151 return captcha_; | 151 return captcha_; |
152 } | 152 } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 GoogleServiceAuthError::GoogleServiceAuthError( | 276 GoogleServiceAuthError::GoogleServiceAuthError( |
277 State s, | 277 State s, |
278 const std::string& captcha_token, | 278 const std::string& captcha_token, |
279 const std::string& prompt_text, | 279 const std::string& prompt_text, |
280 const std::string& alternate_text, | 280 const std::string& alternate_text, |
281 int field_length) | 281 int field_length) |
282 : state_(s), | 282 : state_(s), |
283 second_factor_(captcha_token, prompt_text, alternate_text, field_length), | 283 second_factor_(captcha_token, prompt_text, alternate_text, field_length), |
284 network_error_(0) { | 284 network_error_(0) { |
285 } | 285 } |
OLD | NEW |