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

Unified Diff: chrome/browser/chromeos/settings/device_oauth2_token_service.cc

Issue 57103002: Make OAuth2TokenService::Request class multi-login aware. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 1 month 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/settings/device_oauth2_token_service.cc
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service.cc b/chrome/browser/chromeos/settings/device_oauth2_token_service.cc
index 3086e4d300d2a4ccacf3097d28d39bc542baa7be..363253218a0686cb50c43510ed09ea00d41ec04b 100644
--- a/chrome/browser/chromeos/settings/device_oauth2_token_service.cc
+++ b/chrome/browser/chromeos/settings/device_oauth2_token_service.cc
@@ -38,6 +38,7 @@ class DeviceOAuth2TokenService::ValidatingConsumer
public gaia::GaiaOAuthClient::Delegate {
public:
explicit ValidatingConsumer(DeviceOAuth2TokenService* token_service,
+ const std::string& account_id,
Consumer* consumer);
virtual ~ValidatingConsumer();
@@ -85,8 +86,9 @@ class DeviceOAuth2TokenService::ValidatingConsumer
DeviceOAuth2TokenService::ValidatingConsumer::ValidatingConsumer(
DeviceOAuth2TokenService* token_service,
+ const std::string& account_id,
Consumer* consumer)
- : OAuth2TokenService::RequestImpl(this),
+ : OAuth2TokenService::RequestImpl(account_id, this),
token_service_(token_service),
consumer_(consumer),
token_validation_done_(false),
@@ -276,13 +278,14 @@ net::URLRequestContextGetter* DeviceOAuth2TokenService::GetRequestContext() {
scoped_ptr<OAuth2TokenService::RequestImpl>
DeviceOAuth2TokenService::CreateRequest(
+ const std::string& account_id,
OAuth2TokenService::Consumer* consumer) {
if (refresh_token_is_valid_)
- return OAuth2TokenService::CreateRequest(consumer);
+ return OAuth2TokenService::CreateRequest(account_id, consumer);
// Substitute our own consumer to wait for refresh token validation.
scoped_ptr<ValidatingConsumer> validating_consumer(
- new ValidatingConsumer(this, consumer));
+ new ValidatingConsumer(this, account_id, consumer));
validating_consumer->StartValidation();
return validating_consumer.PassAs<RequestImpl>();
}

Powered by Google App Engine
This is Rietveld 408576698