Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 1496573002: Ensure Sync access token is revoked when user is signed out. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/browser/profile_sync_service.cc
diff --git a/components/browser_sync/browser/profile_sync_service.cc b/components/browser_sync/browser/profile_sync_service.cc
index 4ace5233f866735c2c165ea4f19d5ee831f13053..d10bbf9b50261510b43b6e991c505e15eb76fca5 100644
--- a/components/browser_sync/browser/profile_sync_service.cc
+++ b/components/browser_sync/browser/profile_sync_service.cc
@@ -765,7 +765,8 @@ void ProfileSyncService::OnRefreshTokenAvailable(
void ProfileSyncService::OnRefreshTokenRevoked(
const std::string& account_id) {
- if (account_id == signin_->GetAccountIdToUse()) {
+ if (account_id == signin_->GetAccountIdToUse() ||
+ !signin_->GetOriginal()->IsAuthenticated()) {
Nicolas Zea 2015/12/02 18:57:35 Is this the right place to fix this? Why isn't the
bzanotti 2015/12/02 22:21:46 Please note that I'm not super familiar with sync
Nicolas Zea 2015/12/02 22:27:54 Yeah, I think that OnGoogleSignedOut should also b
access_token_.clear();
UpdateAuthErrorState(
GoogleServiceAuthError(GoogleServiceAuthError::REQUEST_CANCELED));
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698