error_message_(error_message) {
}
-GoogleServiceAuthError::GoogleServiceAuthError(const std::string& error_message)
- : state_(INVALID_GAIA_CREDENTIALS),
- network_error_(0),
- error_message_(error_message) {
-}
-
// static
GoogleServiceAuthError
GoogleServiceAuthError::FromConnectionError(int error) {
default:
NOTREACHED();
}
- return EmptyString();
+ return base::EmptyString();
}
const std::string& GoogleServiceAuthError::error_message() const {
STATE_CASE(HOSTED_NOT_ALLOWED);
STATE_CASE(UNEXPECTED_SERVICE_RESPONSE);
STATE_CASE(SERVICE_ERROR);
+ STATE_CASE(WEB_LOGIN_REQUIRED);
#undef STATE_CASE
default:
NOTREACHED();
case SERVICE_ERROR:
return base::StringPrintf("Service responded with error: '%s'",
error_message_.c_str());
+ case WEB_LOGIN_REQUIRED:
+ return "Less secure apps may not authenticate with this account. "
+ "Please visit: "
+ "https://www.google.com/settings/security/lesssecureapps";
default:
NOTREACHED();
return std::string();
captcha_unlock_url, image_width, image_height),
network_error_(0) {
}
-
-GoogleServiceAuthError::GoogleServiceAuthError(
- State s,
- const std::string& captcha_token,
- const std::string& prompt_text,
- const std::string& alternate_text,
- int field_length)
- : state_(s),
- second_factor_(captcha_token, prompt_text, alternate_text, field_length),
- network_error_(0) {
-}