Commit 9daf9f18 authored by Julie Jeongeun Kim's avatar Julie Jeongeun Kim Committed by Commit Bot

Move RegisterTokenResponse to private

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

It moves RegisterTokenResponse to private since it's
only used by OAuth2AccessTokenManager::Fetcher which is
a nested class in OAuth2AccessTokenManager.

Bug: 967598
Change-Id: Ic51db4d938f955e920a33d00a6f74e07f88a8763
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731029Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#683106}
parent a87baf7d
...@@ -225,13 +225,6 @@ class OAuth2AccessTokenManager { ...@@ -225,13 +225,6 @@ class OAuth2AccessTokenManager {
const std::string& client_secret, const std::string& client_secret,
const ScopeSet& scopes); const ScopeSet& scopes);
// Add a new entry to the cache.
void RegisterTokenResponse(
const std::string& client_id,
const CoreAccountId& account_id,
const ScopeSet& scopes,
const OAuth2AccessTokenConsumer::TokenResponse& token_response);
// Returns a currently valid OAuth2 access token for the given set of scopes, // Returns a currently valid OAuth2 access token for the given set of scopes,
// or NULL if none have been cached. Note the user of this method should // or NULL if none have been cached. Note the user of this method should
// ensure no entry with the same |client_scopes| is added before the usage of // ensure no entry with the same |client_scopes| is added before the usage of
...@@ -312,6 +305,13 @@ class OAuth2AccessTokenManager { ...@@ -312,6 +305,13 @@ class OAuth2AccessTokenManager {
RequestImpl* request, RequestImpl* request,
const RequestParameters& client_scopes); const RequestParameters& client_scopes);
// Add a new entry to the cache.
void RegisterTokenResponse(
const std::string& client_id,
const CoreAccountId& account_id,
const ScopeSet& scopes,
const OAuth2AccessTokenConsumer::TokenResponse& token_response);
// Removes an access token for the given set of scopes from the cache. // Removes an access token for the given set of scopes from the cache.
// Returns true if the entry was removed, otherwise false. // Returns true if the entry was removed, otherwise false.
bool RemoveCachedTokenResponse(const RequestParameters& client_scopes, bool RemoveCachedTokenResponse(const RequestParameters& client_scopes,
......
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