Commit 825ffcab authored by Mihai Sardarescu's avatar Mihai Sardarescu Committed by Commit Bot

Remove refresh token removal from DO2TS as it is never called.

Bug: 1028509

Change-Id: I2e0c01f00093e889963ffe96d2972bad10e61bde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2022663Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735343}
parent dcc97d7c
......@@ -93,9 +93,6 @@ DeviceIdentityProvider::DeviceIdentityProvider(
token_service->SetRefreshTokenAvailableCallback(
base::BindRepeating(&DeviceIdentityProvider::OnRefreshTokenAvailable,
base::Unretained(this)));
token_service->SetRefreshTokenRevokedCallback(
base::BindRepeating(&DeviceIdentityProvider::OnRefreshTokenRevoked,
base::Unretained(this)));
}
}
......@@ -103,7 +100,6 @@ DeviceIdentityProvider::~DeviceIdentityProvider() {
// TODO(blundell): Can |token_service_| ever actually be non-null?
if (token_service_) {
token_service_->SetRefreshTokenAvailableCallback(base::NullCallback());
token_service_->SetRefreshTokenRevokedCallback(base::NullCallback());
}
}
......@@ -158,9 +154,4 @@ void DeviceIdentityProvider::OnRefreshTokenAvailable(
ProcessRefreshTokenUpdateForAccount(account_id);
}
void DeviceIdentityProvider::OnRefreshTokenRevoked(
const CoreAccountId& account_id) {
ProcessRefreshTokenRemovalForAccount(account_id);
}
} // namespace chromeos
......@@ -32,7 +32,6 @@ class DeviceIdentityProvider : public invalidation::IdentityProvider {
void SetActiveAccountId(const CoreAccountId& account_id) override;
void OnRefreshTokenAvailable(const CoreAccountId& account_id);
void OnRefreshTokenRevoked(const CoreAccountId& account_id);
private:
chromeos::DeviceOAuth2TokenService* token_service_;
......
......@@ -125,11 +125,6 @@ void DeviceOAuth2TokenService::SetRefreshTokenAvailableCallback(
on_refresh_token_available_callback_ = std::move(callback);
}
void DeviceOAuth2TokenService::SetRefreshTokenRevokedCallback(
RefreshTokenRevokedCallback callback) {
on_refresh_token_revoked_callback_ = std::move(callback);
}
std::unique_ptr<OAuth2AccessTokenManager::Request>
DeviceOAuth2TokenService::StartAccessTokenRequest(
const CoreAccountId& account_id,
......@@ -215,12 +210,6 @@ void DeviceOAuth2TokenService::FireRefreshTokenAvailable(
on_refresh_token_available_callback_.Run(account_id);
}
void DeviceOAuth2TokenService::FireRefreshTokenRevoked(
const CoreAccountId& account_id) {
if (on_refresh_token_revoked_callback_)
on_refresh_token_revoked_callback_.Run(account_id);
}
bool DeviceOAuth2TokenService::HandleAccessTokenFetch(
OAuth2AccessTokenManager::RequestImpl* request,
const CoreAccountId& account_id,
......
......@@ -40,8 +40,6 @@ class DeviceOAuth2TokenService : public OAuth2AccessTokenManager::Delegate,
public:
typedef base::RepeatingCallback<void(const CoreAccountId& /* account_id */)>
RefreshTokenAvailableCallback;
typedef base::RepeatingCallback<void(const CoreAccountId& /* account_id */)>
RefreshTokenRevokedCallback;
typedef base::Callback<void(bool)> StatusCallback;
......@@ -66,9 +64,6 @@ class DeviceOAuth2TokenService : public OAuth2AccessTokenManager::Delegate,
// available.
void SetRefreshTokenAvailableCallback(RefreshTokenAvailableCallback callback);
// If set, this callback will be invoked when a refresh token is revoked.
void SetRefreshTokenRevokedCallback(RefreshTokenRevokedCallback callback);
// Checks in the cache for a valid access token for a specified |account_id|
// and |scopes|, and if not found starts a request for an OAuth2 access token
// using the OAuth2 refresh token maintained by this instance for that
......@@ -194,7 +189,6 @@ class DeviceOAuth2TokenService : public OAuth2AccessTokenManager::Delegate,
// Callbacks to invoke, if set, for refresh token-related events.
RefreshTokenAvailableCallback on_refresh_token_available_callback_;
RefreshTokenRevokedCallback on_refresh_token_revoked_callback_;
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
......
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