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

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

Issue 1138143002: Pass Device ID in the oauth2/token request. Keep Device ID in local state on Chrome OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed. 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: chrome/browser/chromeos/login/signin/oauth2_token_initializer.cc
diff --git a/chrome/browser/chromeos/login/signin/oauth2_token_initializer.cc b/chrome/browser/chromeos/login/signin/oauth2_token_initializer.cc
index c0bcbc98e1f80706ab1c7d2e6309bb12681dca38..953c5d584357f1fe77ee37c179d6f0374ebc8bc9 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_token_initializer.cc
+++ b/chrome/browser/chromeos/login/signin/oauth2_token_initializer.cc
@@ -21,7 +21,10 @@ void OAuth2TokenInitializer::Start(const UserContext& user_context,
user_context_ = user_context;
oauth2_token_fetcher_.reset(new OAuth2TokenFetcher(
this, g_browser_process->system_request_context()));
- oauth2_token_fetcher_->StartExchangeFromAuthCode(user_context.GetAuthCode());
+ if (user_context.GetDeviceId().empty())
+ NOTREACHED() << "Device ID is not set";
xiyuan 2015/05/13 01:18:02 NOTREACHED() does not do much for ChromeOS. Most o
dzhioev (left Google) 2015/05/14 23:50:52 That should never happen in theory. But it is not
+ oauth2_token_fetcher_->StartExchangeFromAuthCode(user_context.GetAuthCode(),
+ user_context.GetDeviceId());
}
void OAuth2TokenInitializer::OnOAuth2TokensAvailable(

Powered by Google App Engine
This is Rietveld 408576698