Migrate IdentityManager APIs to use identity::ScopeSet
Move all public methods from IdentityManager to using identity::ScopeSet
instead of the equivalent type definition OAuth2TokenService::ScopeSet.
This will make it clearer when migrating from SigninManager[Base] and
[Profile]OAuth2TokenService to the IdentityManager, as code will be
explicitly using a type definition from the identity service.
As a side effect, this patch changes the signature of the constructors
for AccessTokenFetcher and PrimaryAccountAccessTokenFetcher, and update
clients of these APIs wherever needed.
[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
Bug: 899175
Change-Id: I4bda23f4e928cf94654d7c4ce2eb7961ff91dd9e
Reviewed-on: https://chromium-review.googlesource.com/c/1301520
Reviewed-by: Jan Krcal <[email protected]>
Reviewed-by: Colin Blundell <[email protected]>
Reviewed-by: Sylvain Defresne <[email protected]>
Commit-Queue: Mario Sanchez Prada <[email protected]>
Cr-Commit-Position: refs/heads/master@{#603468}
diff --git a/components/invalidation/impl/profile_identity_provider.cc b/components/invalidation/impl/profile_identity_provider.cc
index 34247778..f392053 100644
--- a/components/invalidation/impl/profile_identity_provider.cc
+++ b/components/invalidation/impl/profile_identity_provider.cc
@@ -17,7 +17,7 @@
AccessTokenFetcherAdaptor(const std::string& active_account_id,
const std::string& oauth_consumer_name,
identity::IdentityManager* identity_manager,
- const OAuth2TokenService::ScopeSet& scopes,
+ const identity::ScopeSet& scopes,
ActiveAccountAccessTokenCallback callback);
~AccessTokenFetcherAdaptor() override = default;
@@ -37,7 +37,7 @@
const std::string& active_account_id,
const std::string& oauth_consumer_name,
identity::IdentityManager* identity_manager,
- const OAuth2TokenService::ScopeSet& scopes,
+ const identity::ScopeSet& scopes,
ActiveAccountAccessTokenCallback callback)
: callback_(std::move(callback)) {
access_token_fetcher_ = identity_manager->CreateAccessTokenFetcherForAccount(
@@ -95,7 +95,7 @@
std::unique_ptr<ActiveAccountAccessTokenFetcher>
ProfileIdentityProvider::FetchAccessToken(
const std::string& oauth_consumer_name,
- const OAuth2TokenService::ScopeSet& scopes,
+ const identity::ScopeSet& scopes,
ActiveAccountAccessTokenCallback callback) {
return std::make_unique<AccessTokenFetcherAdaptor>(
GetActiveAccountId(), oauth_consumer_name, identity_manager_, scopes,
@@ -103,7 +103,7 @@
}
void ProfileIdentityProvider::InvalidateAccessToken(
- const OAuth2TokenService::ScopeSet& scopes,
+ const identity::ScopeSet& scopes,
const std::string& access_token) {
identity_manager_->RemoveAccessTokenFromCache(GetActiveAccountId(), scopes,
access_token);