| Index: chrome/browser/signin/token_service.cc
|
| diff --git a/chrome/browser/signin/token_service.cc b/chrome/browser/signin/token_service.cc
|
| index 77345280f4942e8726866cc90be24d43d4a544c6..536dcfa85d6dd65ed41bfd19e84204c1950cd31c 100644
|
| --- a/chrome/browser/signin/token_service.cc
|
| +++ b/chrome/browser/signin/token_service.cc
|
| @@ -123,6 +123,9 @@ void TokenService::UpdateCredentials(
|
| for (size_t i = 0; i < arraysize(kServices); i++) {
|
| fetchers_[i].reset();
|
| }
|
| +
|
| + // Notify the CredentialCacheService that a new lsid and sid are available.
|
| + FireCredentialsUpdatedNotification(credentials.lsid, credentials.sid);
|
| }
|
|
|
| void TokenService::UpdateCredentialsWithOAuth2(
|
| @@ -226,6 +229,16 @@ void TokenService::GetServiceNamesForTesting(std::vector<std::string>* names) {
|
| std::copy(kServices, kServices + arraysize(kServices), names->begin());
|
| }
|
|
|
| +void TokenService::FireCredentialsUpdatedNotification(
|
| + const std::string& lsid,
|
| + const std::string& sid) {
|
| + CredentialsUpdatedDetails details(lsid, sid);
|
| + content::NotificationService::current()->Notify(
|
| + chrome::NOTIFICATION_TOKEN_SERVICE_CREDENTIALS_UPDATED,
|
| + content::Source<TokenService>(this),
|
| + content::Details<const CredentialsUpdatedDetails>(&details));
|
| +}
|
| +
|
| // Note that this can fire twice or more for any given service.
|
| // It can fire once from the DB read, and then once from the initial
|
| // fetcher. Future fetches can cause more notification firings.
|
|
|