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

Unified Diff: google_apis/gaia/ubertoken_fetcher.cc

Issue 1129463004: Let Ubertoken Fetch be primed with an access token. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
Index: google_apis/gaia/ubertoken_fetcher.cc
diff --git a/google_apis/gaia/ubertoken_fetcher.cc b/google_apis/gaia/ubertoken_fetcher.cc
index 15e5932bed620498fe8ede7fc2cd6ad2369c987d..6cfe15f1bba00505878e57923efff8e3610d1c55 100644
--- a/google_apis/gaia/ubertoken_fetcher.cc
+++ b/google_apis/gaia/ubertoken_fetcher.cc
@@ -43,6 +43,16 @@ void UbertokenFetcher::StartFetchingToken(const std::string& account_id) {
RequestAccessToken();
}
+void UbertokenFetcher::StartFetchingTokenWithAccessToken(
+ const std::string& account_id, const std::string& access_token) {
+ DCHECK(!account_id.empty());
+ DCHECK(!access_token.empty());
+
+ account_id_ = account_id;
+ access_token_ = access_token;
+ ExchangeTokens();
+}
+
void UbertokenFetcher::OnUberAuthTokenSuccess(const std::string& token) {
consumer_->OnUbertokenSuccess(token);
}

Powered by Google App Engine
This is Rietveld 408576698