Commit 466b727a authored by Mihai Sardarescu's avatar Mihai Sardarescu Committed by Commit Bot

Rename method in token service diagnostic observer for clarity

Bug: NONE
Change-Id: I18d05d59ba0be38d7598396fab2cef8b44647fcf
Reviewed-on: https://chromium-review.googlesource.com/c/1278754Reviewed-by: default avatarThomas Tangl <tangltom@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599202}
parent ea3132cb
......@@ -364,7 +364,7 @@ void AboutSigninInternals::OnEndBatchChanges() {
NotifyObservers();
}
void AboutSigninInternals::OnTokenRemoved(
void AboutSigninInternals::OnAccessTokenRemoved(
const std::string& account_id,
const OAuth2TokenService::ScopeSet& scopes) {
for (const std::unique_ptr<TokenInfo>& token :
......
......@@ -181,8 +181,9 @@ class AboutSigninInternals
const OAuth2TokenService::ScopeSet& scopes,
GoogleServiceAuthError error,
base::Time expiration_time) override;
void OnTokenRemoved(const std::string& account_id,
const OAuth2TokenService::ScopeSet& scopes) override;
void OnAccessTokenRemoved(
const std::string& account_id,
const OAuth2TokenService::ScopeSet& scopes) override;
// OAuth2TokenServiceDelegate::Observer implementations.
void OnRefreshTokensLoaded() override;
......
......@@ -676,8 +676,8 @@ bool OAuth2TokenService::RemoveCachedTokenResponse(
if (token_iterator != token_cache_.end() &&
token_iterator->second.access_token == token_to_remove) {
for (auto& observer : diagnostics_observer_list_) {
observer.OnTokenRemoved(request_parameters.account_id,
request_parameters.scopes);
observer.OnAccessTokenRemoved(request_parameters.account_id,
request_parameters.scopes);
}
token_cache_.erase(token_iterator);
return true;
......@@ -704,7 +704,7 @@ void OAuth2TokenService::ClearCache() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
for (const auto& entry : token_cache_) {
for (auto& observer : diagnostics_observer_list_)
observer.OnTokenRemoved(entry.first.account_id, entry.first.scopes);
observer.OnAccessTokenRemoved(entry.first.account_id, entry.first.scopes);
}
token_cache_.clear();
......@@ -717,7 +717,7 @@ void OAuth2TokenService::ClearCacheForAccount(const std::string& account_id) {
/* iter incremented in body */) {
if (iter->first.account_id == account_id) {
for (auto& observer : diagnostics_observer_list_)
observer.OnTokenRemoved(account_id, iter->first.scopes);
observer.OnAccessTokenRemoved(account_id, iter->first.scopes);
token_cache_.erase(iter++);
} else {
++iter;
......
......@@ -142,8 +142,9 @@ class OAuth2TokenService {
const ScopeSet& scopes,
GoogleServiceAuthError error,
base::Time expiration_time) {}
virtual void OnTokenRemoved(const std::string& account_id,
const ScopeSet& scopes) {}
// Called when an access token was removed.
virtual void OnAccessTokenRemoved(const std::string& account_id,
const ScopeSet& scopes) {}
};
explicit OAuth2TokenService(
......
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