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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.cc

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a bug affecting ProfileSyncService and CR comments. Created 7 years, 4 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/policy/user_cloud_policy_token_forwarder.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.cc b/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.cc
index ba98790095c0ad32e944a9074bdc9b00be2b1773..889e8457a9ddf65aed73a3badad1f2c16bcbf81d 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.cc
@@ -79,7 +79,8 @@ void UserCloudPolicyTokenForwarder::Initialize() {
return;
}
- if (token_service_->RefreshTokenIsAvailable())
+ if (token_service_->RefreshTokenIsAvailable(
+ token_service_->GetPrimaryAccountId()))
RequestAccessToken();
else
token_service_->AddObserver(this);
@@ -88,7 +89,8 @@ void UserCloudPolicyTokenForwarder::Initialize() {
void UserCloudPolicyTokenForwarder::RequestAccessToken() {
OAuth2TokenService::ScopeSet scopes;
scopes.insert(GaiaConstants::kDeviceManagementServiceOAuth);
- request_ = token_service_->StartRequest(scopes, this);
+ request_ = token_service_->StartRequest(token_service_->GetPrimaryAccountId(),
Andrew T Wilson (Slow) 2013/08/30 10:47:00 I think the wrapping is wrong here - either you sh
fgorski 2013/08/30 20:10:16 Done.
+ scopes, this);
}
} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698