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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 switch (state_) { | 140 switch (state_) { |
141 case CAPTCHA_REQUIRED: | 141 case CAPTCHA_REQUIRED: |
142 return captcha_.token; | 142 return captcha_.token; |
143 break; | 143 break; |
144 case TWO_FACTOR: | 144 case TWO_FACTOR: |
145 return second_factor_.token; | 145 return second_factor_.token; |
146 break; | 146 break; |
147 default: | 147 default: |
148 NOTREACHED(); | 148 NOTREACHED(); |
149 } | 149 } |
150 return EmptyString(); | 150 return base::EmptyString(); |
151 } | 151 } |
152 | 152 |
153 const std::string& GoogleServiceAuthError::error_message() const { | 153 const std::string& GoogleServiceAuthError::error_message() const { |
154 return error_message_; | 154 return error_message_; |
155 } | 155 } |
156 | 156 |
157 base::DictionaryValue* GoogleServiceAuthError::ToValue() const { | 157 base::DictionaryValue* GoogleServiceAuthError::ToValue() const { |
158 base::DictionaryValue* value = new base::DictionaryValue(); | 158 base::DictionaryValue* value = new base::DictionaryValue(); |
159 std::string state_str; | 159 std::string state_str; |
160 switch (state_) { | 160 switch (state_) { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 GoogleServiceAuthError::GoogleServiceAuthError( | 263 GoogleServiceAuthError::GoogleServiceAuthError( |
264 State s, | 264 State s, |
265 const std::string& captcha_token, | 265 const std::string& captcha_token, |
266 const std::string& prompt_text, | 266 const std::string& prompt_text, |
267 const std::string& alternate_text, | 267 const std::string& alternate_text, |
268 int field_length) | 268 int field_length) |
269 : state_(s), | 269 : state_(s), |
270 second_factor_(captcha_token, prompt_text, alternate_text, field_length), | 270 second_factor_(captcha_token, prompt_text, alternate_text, field_length), |
271 network_error_(0) { | 271 network_error_(0) { |
272 } | 272 } |
OLD | NEW |