This source file includes following definitions.
- FetchOAuth2Token
- InvalidateOAuth2Token
- GetRequestContext
- RefreshTokenIsAvailable
- AddAccount
- CreateAccessTokenFetcher
#include "google_apis/gaia/fake_oauth2_token_service.h"
FakeOAuth2TokenService::FakeOAuth2TokenService() : request_context_(NULL) {}
FakeOAuth2TokenService::~FakeOAuth2TokenService() {
}
void FakeOAuth2TokenService::FetchOAuth2Token(
RequestImpl* request,
const std::string& account_id,
net::URLRequestContextGetter* getter,
const std::string& client_id,
const std::string& client_secret,
const ScopeSet& scopes) {
}
void FakeOAuth2TokenService::InvalidateOAuth2Token(
const std::string& account_id,
const std::string& client_id,
const ScopeSet& scopes,
const std::string& access_token) {
}
net::URLRequestContextGetter* FakeOAuth2TokenService::GetRequestContext() {
return request_context_;
}
bool FakeOAuth2TokenService::RefreshTokenIsAvailable(
const std::string& account_id) const {
return account_ids_.count(account_id) != 0;
};
void FakeOAuth2TokenService::AddAccount(const std::string& account_id) {
account_ids_.insert(account_id);
}
OAuth2AccessTokenFetcher* FakeOAuth2TokenService::CreateAccessTokenFetcher(
const std::string& account_id,
net::URLRequestContextGetter* getter,
OAuth2AccessTokenConsumer* consumer) {
NOTREACHED();
return NULL;
}