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

Unified Diff: google_apis/gaia/gaia_auth_fetcher.cc

Issue 301323003: Remove GaiaAuthFetcher::StartCookieForOAuthCodeExchange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.h ('k') | google_apis/gaia/gaia_auth_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_auth_fetcher.cc
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
index 4e21fd7e59153405107015031e1b07df4289a172..f0494ab5e55c173d5af64be384e5cdcd7867853b 100644
--- a/google_apis/gaia/gaia_auth_fetcher.cc
+++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -183,8 +183,7 @@ GaiaAuthFetcher::GaiaAuthFetcher(GaiaAuthConsumer* consumer,
list_accounts_gurl_(GaiaUrls::GetInstance()->list_accounts_url()),
client_login_to_oauth2_gurl_(
GaiaUrls::GetInstance()->client_login_to_oauth2_url()),
- fetch_pending_(false),
- fetch_code_only_(false) {}
+ fetch_pending_(false) {}
GaiaAuthFetcher::~GaiaAuthFetcher() {}
@@ -544,13 +543,6 @@ void GaiaAuthFetcher::StartRevokeOAuth2Token(const std::string& auth_token) {
fetcher_->Start();
}
-void GaiaAuthFetcher::StartCookieForOAuthCodeExchange(
- const std::string& session_index) {
- // Same as the first step of StartCookieForOAuthLoginTokenExchange;
- StartCookieForOAuthLoginTokenExchange(session_index);
- fetch_code_only_ = true;
-}
-
void GaiaAuthFetcher::StartCookieForOAuthLoginTokenExchange(
const std::string& session_index) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
@@ -572,7 +564,6 @@ void GaiaAuthFetcher::StartCookieForOAuthLoginTokenExchange(
net::LOAD_NORMAL,
this));
fetch_pending_ = true;
- fetch_code_only_ = false;
fetcher_->Start();
}
@@ -764,16 +755,10 @@ void GaiaAuthFetcher::OnClientLoginToOAuth2Fetched(
if (status.is_success() && response_code == net::HTTP_OK) {
std::string auth_code;
ParseClientLoginToOAuth2Response(cookies, &auth_code);
- if (fetch_code_only_)
- consumer_->OnClientOAuthCodeSuccess(auth_code);
- else
- StartAuthCodeForOAuth2TokenExchange(auth_code);
+ StartAuthCodeForOAuth2TokenExchange(auth_code);
} else {
GoogleServiceAuthError auth_error(GenerateAuthError(data, status));
- if (fetch_code_only_)
- consumer_->OnClientOAuthCodeFailure(auth_error);
- else
- consumer_->OnClientOAuthFailure(auth_error);
+ consumer_->OnClientOAuthFailure(auth_error);
}
}
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.h ('k') | google_apis/gaia/gaia_auth_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698