Commit 1255648c authored by Julie Jeongeun Kim's avatar Julie Jeongeun Kim Committed by Commit Bot

Move InvalidateAccessTokenImpl to protected

This CL is a part of moving access token management to
OAuth2AccessTokenManager.

It moves InvalidateAccessTokenImpl from
OAuth2AccessTokenManager to protected since it's only
used from child classes.

It also cleans up invalid TODO messages.

Bug: 967598
Change-Id: Id4cd6855c4dfc96d5edb668341bf0277ce8ad6fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1723850Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#682208}
parent 382be08d
...@@ -217,7 +217,6 @@ class OAuth2AccessTokenManager { ...@@ -217,7 +217,6 @@ class OAuth2AccessTokenManager {
// Fetches an OAuth token for the specified client/scopes. Virtual so it can // Fetches an OAuth token for the specified client/scopes. Virtual so it can
// be overridden for tests. // be overridden for tests.
// TODO(https://crbug.com/967598): Move this to protected.
virtual void FetchOAuth2Token( virtual void FetchOAuth2Token(
RequestImpl* request, RequestImpl* request,
const CoreAccountId& account_id, const CoreAccountId& account_id,
...@@ -250,12 +249,10 @@ class OAuth2AccessTokenManager { ...@@ -250,12 +249,10 @@ class OAuth2AccessTokenManager {
// Cancels all requests that are currently in progress. Virtual so it can be // Cancels all requests that are currently in progress. Virtual so it can be
// overridden for tests. // overridden for tests.
// TODO(https://crbug.com/967598): Move this to protected.
virtual void CancelAllRequests(); virtual void CancelAllRequests();
// Cancels all requests related to a given |account_id|. Virtual so it can be // Cancels all requests related to a given |account_id|. Virtual so it can be
// overridden for tests. // overridden for tests.
// TODO(https://crbug.com/967598): Move this to protected.
virtual void CancelRequestsForAccount(const CoreAccountId& account_id); virtual void CancelRequestsForAccount(const CoreAccountId& account_id);
// Mark an OAuth2 |access_token| issued for |account_id| and |scopes| as // Mark an OAuth2 |access_token| issued for |account_id| and |scopes| as
...@@ -267,14 +264,6 @@ class OAuth2AccessTokenManager { ...@@ -267,14 +264,6 @@ class OAuth2AccessTokenManager {
const ScopeSet& scopes, const ScopeSet& scopes,
const std::string& access_token); const std::string& access_token);
// Invalidates the |access_token| issued for |account_id|, |client_id| and
// |scopes|. Virtual so it can be overridden for tests.
// TODO(https://crbug.com/967598): Move this to protected.
virtual void InvalidateAccessTokenImpl(const CoreAccountId& account_id,
const std::string& client_id,
const ScopeSet& scopes,
const std::string& access_token);
void set_max_authorization_token_fetch_retries_for_testing(int max_retries); void set_max_authorization_token_fetch_retries_for_testing(int max_retries);
// Returns the current number of pending fetchers matching given params. // Returns the current number of pending fetchers matching given params.
...@@ -286,6 +275,14 @@ class OAuth2AccessTokenManager { ...@@ -286,6 +275,14 @@ class OAuth2AccessTokenManager {
const base::ObserverList<DiagnosticsObserver, true>::Unchecked& const base::ObserverList<DiagnosticsObserver, true>::Unchecked&
GetDiagnosticsObserversForTesting(); GetDiagnosticsObserversForTesting();
protected:
// Invalidates the |access_token| issued for |account_id|, |client_id| and
// |scopes|. Virtual so it can be overridden for tests.
virtual void InvalidateAccessTokenImpl(const CoreAccountId& account_id,
const std::string& client_id,
const ScopeSet& scopes,
const std::string& access_token);
private: private:
class Fetcher; class Fetcher;
friend class Fetcher; friend class Fetcher;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment