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

Unified Diff: components/gcm_driver/gcm_client.h

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Fix include Created 3 years, 9 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/fake_gcm_driver.cc ('k') | components/gcm_driver/gcm_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_client.h
diff --git a/components/gcm_driver/gcm_client.h b/components/gcm_driver/gcm_client.h
index 95a56d9d0e0f667fc24228fcfaaf535447794f88..921c414cd95a66f47310fb6d628b2831010bba63 100644
--- a/components/gcm_driver/gcm_client.h
+++ b/components/gcm_driver/gcm_client.h
@@ -261,6 +261,13 @@ class GCMClient {
virtual void Register(
const linked_ptr<RegistrationInfo>& registration_info) = 0;
+ // Checks that the provided |registration_id| (aka token for Instance ID
+ // registrations) matches the stored registration info. Also checks sender IDs
+ // match for GCM registrations.
+ virtual bool ValidateRegistration(
+ const linked_ptr<RegistrationInfo>& registration_info,
+ const std::string& registration_id) = 0;
+
// Unregisters from the server to stop accessing the provided service.
// Delegate::OnUnregisterFinished will be called asynchronously upon
// completion.
« no previous file with comments | « components/gcm_driver/fake_gcm_driver.cc ('k') | components/gcm_driver/gcm_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698