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

Unified Diff: google_apis/gaia/fake_oauth2_token_service.h

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address final comments Created 5 years, 6 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
« no previous file with comments | « google_apis/BUILD.gn ('k') | google_apis/gaia/fake_oauth2_token_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/fake_oauth2_token_service.h
diff --git a/google_apis/gaia/fake_oauth2_token_service.h b/google_apis/gaia/fake_oauth2_token_service.h
index ffe7b6abb31e58ba3ea21b61fd3526b6b5c4a60b..77be353e977c446e3decf527652fa178923fff0b 100644
--- a/google_apis/gaia/fake_oauth2_token_service.h
+++ b/google_apis/gaia/fake_oauth2_token_service.h
@@ -5,11 +5,7 @@
#ifndef GOOGLE_APIS_GAIA_FAKE_OAUTH2_TOKEN_SERVICE_H_
#define GOOGLE_APIS_GAIA_FAKE_OAUTH2_TOKEN_SERVICE_H_
-#include <set>
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/memory/weak_ptr.h"
+#include "google_apis/gaia/fake_oauth2_token_service_delegate.h"
#include "google_apis/gaia/oauth2_token_service.h"
namespace net {
@@ -22,8 +18,6 @@ class FakeOAuth2TokenService : public OAuth2TokenService {
FakeOAuth2TokenService();
~FakeOAuth2TokenService() override;
- std::vector<std::string> GetAccounts() override;
-
void AddAccount(const std::string& account_id);
void RemoveAccount(const std::string& account_id);
@@ -36,9 +30,7 @@ class FakeOAuth2TokenService : public OAuth2TokenService {
const std::string& account_id,
const GoogleServiceAuthError& auth_error);
- void set_request_context(net::URLRequestContextGetter* request_context) {
- request_context_ = request_context;
- }
+ FakeOAuth2TokenServiceDelegate* GetFakeOAuth2TokenServiceDelegate();
protected:
// OAuth2TokenService overrides.
@@ -49,12 +41,10 @@ class FakeOAuth2TokenService : public OAuth2TokenService {
const std::string& client_secret,
const ScopeSet& scopes) override;
- void InvalidateOAuth2Token(const std::string& account_id,
- const std::string& client_id,
- const ScopeSet& scopes,
- const std::string& access_token) override;
-
- bool RefreshTokenIsAvailable(const std::string& account_id) const override;
+ void InvalidateAccessTokenImpl(const std::string& account_id,
+ const std::string& client_id,
+ const ScopeSet& scopes,
+ const std::string& access_token) override;
private:
struct PendingRequest {
@@ -68,19 +58,8 @@ class FakeOAuth2TokenService : public OAuth2TokenService {
base::WeakPtr<RequestImpl> request;
};
- // OAuth2TokenService overrides.
- net::URLRequestContextGetter* GetRequestContext() override;
-
- OAuth2AccessTokenFetcher* CreateAccessTokenFetcher(
- const std::string& account_id,
- net::URLRequestContextGetter* getter,
- OAuth2AccessTokenConsumer* consumer) override;
-
- std::set<std::string> account_ids_;
std::vector<PendingRequest> pending_requests_;
- net::URLRequestContextGetter* request_context_; // weak
-
DISALLOW_COPY_AND_ASSIGN(FakeOAuth2TokenService);
};
« no previous file with comments | « google_apis/BUILD.gn ('k') | google_apis/gaia/fake_oauth2_token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698