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

Unified Diff: components/gcm_driver/gcm_driver_desktop.cc

Issue 608813003: Revert of Clear GCM data when the user clears cookies and other site data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « components/gcm_driver/gcm_driver_desktop.h ('k') | components/gcm_driver/gcm_driver_desktop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver_desktop.cc
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc
index 8d35c2c03acf9c2ed8b0fd8cfd00cb4ea2dd5656..672296656784a79d914aaf97f3f695f6e3d9070f 100644
--- a/components/gcm_driver/gcm_driver_desktop.cc
+++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -369,18 +369,13 @@
EnsureStarted();
}
-void GCMDriverDesktop::OnSignedOut() {
+void GCMDriverDesktop::Purge() {
+ DCHECK(ui_thread_->RunsTasksOnCurrentThread());
+
+ // We still proceed with the check-out logic even if the check-in is not
+ // initiated in the current session. This will make sure that all the
+ // persisted data written previously will get purged.
signed_in_ = false;
-
- // When sign-in enforcement is dropped, we will no longer wipe out the GCM
- // data when the user signs out.
- if (!GCMDriver::IsAllowedForAllUsers())
- Purge();
-}
-
-void GCMDriverDesktop::Purge() {
- DCHECK(ui_thread_->RunsTasksOnCurrentThread());
-
RemoveCachedData();
io_thread_->PostTask(FROM_HERE,
@@ -621,6 +616,7 @@
if (app_handlers().empty())
return GCMClient::UNKNOWN_ERROR;
+ // TODO(jianli): To be removed when sign-in enforcement is dropped.
if (!signed_in_ && !GCMDriver::IsAllowedForAllUsers())
return GCMClient::NOT_SIGNED_IN;
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.h ('k') | components/gcm_driver/gcm_driver_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698