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

Unified Diff: components/gcm_driver/gcm_app_handler.h

Issue 2473813002: Notify GCMAppHandlers when the store is reset, so they clear cached IDs (Closed)
Patch Set: Created 4 years, 1 month 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
Index: components/gcm_driver/gcm_app_handler.h
diff --git a/components/gcm_driver/gcm_app_handler.h b/components/gcm_driver/gcm_app_handler.h
index 4ee8b906167f68bdf3bf52c44fcda9ba38b7c83b..0390984c708fef444444beeac7ca974a99ea1602 100644
--- a/components/gcm_driver/gcm_app_handler.h
+++ b/components/gcm_driver/gcm_app_handler.h
@@ -23,6 +23,11 @@ class GCMAppHandler {
// make safe for ShutdownHandler to be called multiple times.
virtual void ShutdownHandler() = 0;
+ // Called when the GCM store is reset (e.g. due to corruption), which changes
+ // the device ID, invalidating all prior registrations. Any stored
+ // registration IDs should be deleted.
Peter Beverloo 2016/11/03 17:28:57 Maybe broaden this to "Any stored state related to
johnme 2016/11/08 19:22:41 Done (also mentioned InstanceIDs).
+ virtual void OnStoreReset() = 0;
+
// Called when a GCM message has been received.
virtual void OnMessage(const std::string& app_id,
const IncomingMessage& message) = 0;

Powered by Google App Engine
This is Rietveld 408576698