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

Unified Diff: google_apis/gaia/google_service_auth_error.cc

Issue 14169010: Remove support for ClientOAuth from GaiaAuthFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/gaia/google_service_auth_error.cc
diff --git a/google_apis/gaia/google_service_auth_error.cc b/google_apis/gaia/google_service_auth_error.cc
index 96fc063cb7eef0c4dae7f51824ea7dd98956969c..e777b10b76d180bc065a6cd7b3d81da05835fcb8 100644
--- a/google_apis/gaia/google_service_auth_error.cc
+++ b/google_apis/gaia/google_service_auth_error.cc
@@ -96,49 +96,6 @@ GoogleServiceAuthError GoogleServiceAuthError::FromClientLoginCaptchaChallenge(
captcha_image_url, captcha_unlock_url, 0, 0);
}
-// static
-GoogleServiceAuthError GoogleServiceAuthError::FromCaptchaChallenge(
- const std::string& captcha_token,
- const GURL& captcha_audio_url,
- const GURL& captcha_image_url,
- int image_width,
- int image_height) {
- return GoogleServiceAuthError(CAPTCHA_REQUIRED, captcha_token,
- captcha_audio_url, captcha_image_url,
- GURL(), image_width, image_height);
-}
-
-// static
-GoogleServiceAuthError GoogleServiceAuthError::FromSecondFactorChallenge(
- const std::string& captcha_token,
- const std::string& prompt_text,
- const std::string& alternate_text,
- int field_length) {
- return GoogleServiceAuthError(TWO_FACTOR, captcha_token, prompt_text,
- alternate_text, field_length);
-}
-
-// static
-GoogleServiceAuthError GoogleServiceAuthError::FromClientOAuthError(
- const std::string& data) {
- scoped_ptr<base::Value> value(base::JSONReader::Read(data));
- if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY)
- return GoogleServiceAuthError(CONNECTION_FAILED, 0);
-
- DictionaryValue* dict = static_cast<DictionaryValue*>(value.get());
-
- std::string cause;
- if (!dict->GetStringWithoutPathExpansion("cause", &cause))
- return GoogleServiceAuthError(CONNECTION_FAILED, 0);
-
- // The explanation field is optional.
- std::string explanation;
- if (!dict->GetStringWithoutPathExpansion("explanation", &explanation))
- explanation.clear();
-
- return GoogleServiceAuthError(explanation);
-}
-
GoogleServiceAuthError GoogleServiceAuthError::AuthErrorNone() {
return GoogleServiceAuthError(NONE);
}
« no previous file with comments | « google_apis/gaia/google_service_auth_error.h ('k') | google_apis/gaia/google_service_auth_error_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698