Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / google_apis / gaia / google_service_auth_error.cc
index ab3d9c0..7796fae 100644 (file)
@@ -81,12 +81,6 @@ GoogleServiceAuthError::GoogleServiceAuthError(
       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) {
@@ -147,7 +141,7 @@ const std::string& GoogleServiceAuthError::token() const {
     default:
       NOTREACHED();
   }
-  return EmptyString();
+  return base::EmptyString();
 }
 
 const std::string& GoogleServiceAuthError::error_message() const {
@@ -172,6 +166,7 @@ base::DictionaryValue* GoogleServiceAuthError::ToValue() 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();
@@ -235,6 +230,10 @@ std::string GoogleServiceAuthError::ToString() const {
     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();
@@ -259,14 +258,3 @@ GoogleServiceAuthError::GoogleServiceAuthError(
                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) {
-}