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

Unified Diff: chrome/browser/signin/fake_profile_oauth2_token_service.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: Rebasing to include the update to ProfileSyncService: r224220 Created 7 years, 3 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.cc
diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service.cc b/chrome/browser/signin/fake_profile_oauth2_token_service.cc
index 6a3c8c35cd4ba8c95dbcab34f89aded700663196..6c864b15578f4d04f60240ff9228e0e6bd69ed7d 100644
--- a/chrome/browser/signin/fake_profile_oauth2_token_service.cc
+++ b/chrome/browser/signin/fake_profile_oauth2_token_service.cc
@@ -24,6 +24,11 @@ FakeProfileOAuth2TokenService::FakeProfileOAuth2TokenService() {
FakeProfileOAuth2TokenService::~FakeProfileOAuth2TokenService() {
}
+bool FakeProfileOAuth2TokenService::RefreshTokenIsAvailable(
+ const std::string& account_id) {
+ return !GetRefreshToken(account_id).empty();
+}
+
void FakeProfileOAuth2TokenService::IssueRefreshToken(
const std::string& token) {
refresh_token_ = token;
@@ -82,7 +87,8 @@ void FakeProfileOAuth2TokenService::CompleteRequests(
}
}
-std::string FakeProfileOAuth2TokenService::GetRefreshToken() {
+std::string FakeProfileOAuth2TokenService::GetRefreshToken(
+ const std::string& account_id) {
return refresh_token_;
}
@@ -104,11 +110,13 @@ FakeProfileOAuth2TokenService::GetPendingRequests() {
void FakeProfileOAuth2TokenService::FetchOAuth2Token(
RequestImpl* request,
+ const std::string& account_id,
net::URLRequestContextGetter* getter,
const std::string& client_id,
const std::string& client_secret,
const ScopeSet& scopes) {
PendingRequest pending_request;
+ pending_request.account_id = account_id;
pending_request.client_id = client_id;
pending_request.client_secret = client_secret;
pending_request.scopes = scopes;
« no previous file with comments | « chrome/browser/signin/fake_profile_oauth2_token_service.h ('k') | chrome/browser/signin/profile_oauth2_token_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698