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

Unified Diff: chrome/browser/signin/fake_profile_oauth2_token_service.h

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates to AndroidPO2TS and removing the DCHECK(signin_manager) from GetPrimaryAccountId 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/signin/fake_profile_oauth2_token_service.h
diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service.h b/chrome/browser/signin/fake_profile_oauth2_token_service.h
index cd5bc8b493e4e77ea65c31e015090e0a8709ef36..ab5cf62cea692d5f9cfa525c114cb81f74b96e9d 100644
--- a/chrome/browser/signin/fake_profile_oauth2_token_service.h
+++ b/chrome/browser/signin/fake_profile_oauth2_token_service.h
@@ -43,6 +43,7 @@ class FakeProfileOAuth2TokenService : public ProfileOAuth2TokenService {
PendingRequest();
~PendingRequest();
+ std::string account_id;
std::string client_id;
std::string client_secret;
ScopeSet scopes;
@@ -74,6 +75,7 @@ class FakeProfileOAuth2TokenService : public ProfileOAuth2TokenService {
void IssueErrorForAllPendingRequests(const GoogleServiceAuthError& error);
+ virtual void Initialize(Profile* profile) OVERRIDE;
virtual void Shutdown() OVERRIDE;
// Helper function to be used with
@@ -83,12 +85,13 @@ class FakeProfileOAuth2TokenService : public ProfileOAuth2TokenService {
protected:
// OAuth2TokenService overrides.
virtual void FetchOAuth2Token(RequestImpl* request,
+ const std::string& account_id,
net::URLRequestContextGetter* getter,
const std::string& client_id,
const std::string& client_secret,
const ScopeSet& scopes) OVERRIDE;
- virtual std::string GetRefreshToken() OVERRIDE;
+ virtual std::string GetRefreshToken(const std::string& account_id) OVERRIDE;
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
@@ -104,6 +107,7 @@ class FakeProfileOAuth2TokenService : public ProfileOAuth2TokenService {
std::vector<PendingRequest> pending_requests_;
std::string refresh_token_;
+ bool is_initialized_;
DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenService);
};

Powered by Google App Engine
This is Rietveld 408576698