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

Unified Diff: chrome/browser/chromeos/login/signin/oauth2_token_fetcher.cc

Issue 382983003: Pass signin_scoped_device_id to refresh token request on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 5 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: chrome/browser/chromeos/login/signin/oauth2_token_fetcher.cc
diff --git a/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.cc b/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.cc
index 8a841d47ee08affd46c02f714fee640ec1c49347..efc27ce7ede2def813d9e439132a62dfc6ca180d 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.cc
+++ b/chrome/browser/chromeos/login/signin/oauth2_token_fetcher.cc
@@ -40,9 +40,11 @@ OAuth2TokenFetcher::~OAuth2TokenFetcher() {
}
void OAuth2TokenFetcher::StartExchangeFromCookies(
- const std::string& session_index) {
+ const std::string& session_index,
+ const std::string& signin_scoped_device_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
session_index_ = session_index;
+ signin_scoped_device_id_ = signin_scoped_device_id;
// Delay the verification if the network is not connected or on a captive
// portal.
const NetworkState* default_network =
@@ -56,11 +58,13 @@ void OAuth2TokenFetcher::StartExchangeFromCookies(
FROM_HERE,
base::Bind(&OAuth2TokenFetcher::StartExchangeFromCookies,
AsWeakPtr(),
- session_index),
+ session_index,
+ signin_scoped_device_id),
base::TimeDelta::FromMilliseconds(kRequestRestartDelay));
return;
}
- auth_fetcher_.StartCookieForOAuthLoginTokenExchange(session_index);
+ auth_fetcher_.StartCookieForOAuthLoginTokenExchangeWithDeviceId(
+ session_index, signin_scoped_device_id);
}
void OAuth2TokenFetcher::StartExchangeFromAuthCode(
@@ -102,7 +106,8 @@ void OAuth2TokenFetcher::OnClientOAuthFailure(
auth_code_.empty()
? base::Bind(&OAuth2TokenFetcher::StartExchangeFromCookies,
AsWeakPtr(),
- session_index_)
+ session_index_,
+ signin_scoped_device_id_)
: base::Bind(&OAuth2TokenFetcher::StartExchangeFromAuthCode,
AsWeakPtr(),
auth_code_),

Powered by Google App Engine
This is Rietveld 408576698