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

Unified Diff: google_apis/gcm/engine/gcm_store.h

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch to land Created 5 years, 7 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 | « google_apis/gcm/engine/gcm_registration_request_handler.cc ('k') | google_apis/gcm/engine/gcm_store_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/gcm_store.h
diff --git a/google_apis/gcm/engine/gcm_store.h b/google_apis/gcm/engine/gcm_store.h
index cfefe914b45ddc4b86d1fac8a65b39a5dd8dc075..83ec73de0ec14f30d6d824557041788faa4364a1 100644
--- a/google_apis/gcm/engine/gcm_store.h
+++ b/google_apis/gcm/engine/gcm_store.h
@@ -20,7 +20,6 @@
#include "base/time/time.h"
#include "google_apis/gcm/base/gcm_export.h"
#include "google_apis/gcm/engine/account_mapping.h"
-#include "google_apis/gcm/engine/registration_info.h"
namespace gcm {
@@ -47,7 +46,7 @@ class GCM_EXPORT GCMStore {
bool success;
uint64 device_android_id;
uint64 device_security_token;
- RegistrationInfoMap registrations;
+ std::map<std::string, std::string> registrations;
std::vector<std::string> incoming_messages;
OutgoingMessageMap outgoing_messages;
std::map<std::string, std::string> gservices_settings;
@@ -82,11 +81,15 @@ class GCM_EXPORT GCMStore {
uint64 device_security_token,
const UpdateCallback& callback) = 0;
- // Registration info.
- virtual void AddRegistration(const std::string& app_id,
- const linked_ptr<RegistrationInfo>& registration,
+ // Registration info for both GCM registrations and InstanceID tokens.
+ // For GCM, |serialized_key| is app_id and |serialized_value| is
+ // serialization of (senders, registration_id). For InstanceID,
+ // |serialized_key| is serialization of (app_id, authorized_entity, scope)
+ // and |serialized_value| is token.
+ virtual void AddRegistration(const std::string& serialized_key,
+ const std::string& serialized_value,
const UpdateCallback& callback) = 0;
- virtual void RemoveRegistration(const std::string& app_id,
+ virtual void RemoveRegistration(const std::string& serialized_key,
const UpdateCallback& callback) = 0;
// Unacknowledged incoming message handling.
« no previous file with comments | « google_apis/gcm/engine/gcm_registration_request_handler.cc ('k') | google_apis/gcm/engine/gcm_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698