Commit c4c05921 authored by Julie Jeongeun Kim's avatar Julie Jeongeun Kim Committed by Commit Bot

Update the scopes type with ScopeSet for OnAccessTokenInvalidated

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

It updates the type for scopes with ScopeSet for
OnAccessTokenInvalidated from
OAuth2AccessTokenManager::Delegate to keep consistency.

Bug: 967598
Change-Id: Ic5163c4ce12bc9eba43b46ff13b6bb43b72c7309
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1725477Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#682215}
parent 2be78435
...@@ -104,7 +104,7 @@ ProfileOAuth2TokenService::GetURLLoaderFactory() const { ...@@ -104,7 +104,7 @@ ProfileOAuth2TokenService::GetURLLoaderFactory() const {
void ProfileOAuth2TokenService::OnAccessTokenInvalidated( void ProfileOAuth2TokenService::OnAccessTokenInvalidated(
const CoreAccountId& account_id, const CoreAccountId& account_id,
const std::string& client_id, const std::string& client_id,
const std::set<std::string>& scopes, const OAuth2AccessTokenManager::ScopeSet& scopes,
const std::string& access_token) { const std::string& access_token) {
delegate_->OnAccessTokenInvalidated(account_id, client_id, scopes, delegate_->OnAccessTokenInvalidated(account_id, client_id, scopes,
access_token); access_token);
......
...@@ -84,10 +84,11 @@ class ProfileOAuth2TokenService : public OAuth2AccessTokenManager::Delegate, ...@@ -84,10 +84,11 @@ class ProfileOAuth2TokenService : public OAuth2AccessTokenManager::Delegate,
bool FixRequestErrorIfPossible() override; bool FixRequestErrorIfPossible() override;
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory()
const override; const override;
void OnAccessTokenInvalidated(const CoreAccountId& account_id, void OnAccessTokenInvalidated(
const std::string& client_id, const CoreAccountId& account_id,
const std::set<std::string>& scopes, const std::string& client_id,
const std::string& access_token) override; const OAuth2AccessTokenManager::ScopeSet& scopes,
const std::string& access_token) override;
void OnAccessTokenFetched(const CoreAccountId& account_id, void OnAccessTokenFetched(const CoreAccountId& account_id,
const GoogleServiceAuthError& error) override; const GoogleServiceAuthError& error) override;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "components/signin/public/identity_manager/load_credentials_state.h" #include "components/signin/public/identity_manager/load_credentials_state.h"
#include "google_apis/gaia/gaia_auth_util.h" #include "google_apis/gaia/gaia_auth_util.h"
#include "google_apis/gaia/google_service_auth_error.h" #include "google_apis/gaia/google_service_auth_error.h"
#include "google_apis/gaia/oauth2_access_token_manager.h"
#include "net/base/backoff_entry.h" #include "net/base/backoff_entry.h"
namespace network { namespace network {
...@@ -60,10 +61,11 @@ class ProfileOAuth2TokenServiceDelegate { ...@@ -60,10 +61,11 @@ class ProfileOAuth2TokenServiceDelegate {
virtual std::vector<CoreAccountId> GetAccounts() const; virtual std::vector<CoreAccountId> GetAccounts() const;
virtual void RevokeAllCredentials() {} virtual void RevokeAllCredentials() {}
virtual void OnAccessTokenInvalidated(const CoreAccountId& account_id, virtual void OnAccessTokenInvalidated(
const std::string& client_id, const CoreAccountId& account_id,
const std::set<std::string>& scopes, const std::string& client_id,
const std::string& access_token) {} const OAuth2AccessTokenManager::ScopeSet& scopes,
const std::string& access_token) {}
// If refresh token is accessible (on Desktop) sets error for it to // If refresh token is accessible (on Desktop) sets error for it to
// INVALID_GAIA_CREDENTIALS and notifies the observers. Otherwise // INVALID_GAIA_CREDENTIALS and notifies the observers. Otherwise
......
...@@ -64,7 +64,7 @@ class OAuth2AccessTokenManager { ...@@ -64,7 +64,7 @@ class OAuth2AccessTokenManager {
// Called when an access token is invalidated. // Called when an access token is invalidated.
virtual void OnAccessTokenInvalidated(const CoreAccountId& account_id, virtual void OnAccessTokenInvalidated(const CoreAccountId& account_id,
const std::string& client_id, const std::string& client_id,
const std::set<std::string>& scopes, const ScopeSet& scopes,
const std::string& access_token) {} const std::string& access_token) {}
// Called when an access token is fetched. // Called when an access token is fetched.
......
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