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

Unified Diff: components/gcm_driver/gcm_driver.h

Issue 1701973003: Remove associated keying material when unregistering from GCM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/crypto/gcm_key_store_unittest.cc ('k') | components/gcm_driver/gcm_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_driver.h
diff --git a/components/gcm_driver/gcm_driver.h b/components/gcm_driver/gcm_driver.h
index 1b79e2fd51f2f3439e465f3cb5528ef9a6765007..14f7118d5d62b26a84ff79e88eba2ad83b15bf96 100644
--- a/components/gcm_driver/gcm_driver.h
+++ b/components/gcm_driver/gcm_driver.h
@@ -109,14 +109,15 @@ class GCMDriver {
const std::vector<std::string>& sender_ids,
const RegisterCallback& callback);
- // Unregisters all sender_ids for an app. Only works on non-Android.
+ // Unregisters all sender_ids for an app. Only works on non-Android. Will also
+ // remove any encryption keys associated with the |app_id|.
// |app_id|: application ID.
// |callback|: to be called once the asynchronous operation is done.
void Unregister(const std::string& app_id,
const UnregisterCallback& callback);
// Unregisters an (app_id, sender_id) pair from using GCM. Only works on
- // Android.
+ // Android. Will also remove any encryption keys associated with the |app_id|.
// TODO(jianli): Switch to using GCM's unsubscribe API.
// |app_id|: application ID.
// |sender_id|: the sender ID that was passed when registering.
@@ -266,9 +267,14 @@ class GCMDriver {
const std::string& registration_id,
GCMClient::Result result);
+ // To be called when a registration for |app_id| has been unregistered, having
+ // |result| as the result of the unregistration. Will remove any encryption
+ // information associated with the |app_id| and then calls UnregisterFinished.
+ void UnregisterRemoveEncryptionInfo(const std::string& app_id,
Nicolas Zea 2016/02/16 22:59:22 nit: maybe rename to RemoveEncryptionInfoAfterUnre
Peter Beverloo 2016/02/17 10:20:24 Done.
+ GCMClient::Result result);
+
// Runs the Unregister callback.
- void UnregisterFinished(const std::string& app_id,
- GCMClient::Result result);
+ void UnregisterFinished(const std::string& app_id, GCMClient::Result result);
// Runs the Send callback.
void SendFinished(const std::string& app_id,
« no previous file with comments | « components/gcm_driver/crypto/gcm_key_store_unittest.cc ('k') | components/gcm_driver/gcm_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698