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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service.cc

Issue 617003005: Keep the GCM data intact when the user signs out of the profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 months 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 | « no previous file | chrome/browser/services/gcm/gcm_profile_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/services/gcm/gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc
index 7ade721b45bae41c2b438138bdba77d2bbd62ffe..0349d5493a7ccaec7653285a29566143204ee532 100644
--- a/chrome/browser/services/gcm/gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service.cc
@@ -120,9 +120,11 @@ void GCMProfileService::IdentityObserver::OnActiveAccountLogout() {
// Check is necessary to not crash browser_tests.
if (gcm_account_tracker_)
gcm_account_tracker_->Stop();
- // TODO(fgorski): If we purge here, what should happen when we get
- // OnActiveAccountLogin() right after that?
- driver_->Purge();
+ // When sign-in enforcement is not dropped, OnSignedOut will also clear all
+ // the GCM data and a new GCM ID will be retrieved after the user signs in
+ // again. Otherwise, the user sign-out will not affect the existing GCM
+ // data.
+ driver_->OnSignedOut();
}
std::string GCMProfileService::IdentityObserver::SignedInUserName() const {
« no previous file with comments | « no previous file | chrome/browser/services/gcm/gcm_profile_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698