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

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

Issue 207443002: [GCM] Move registration info persistence from extension state store to GCM store (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 6 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 | « chrome/common/pref_names.cc ('k') | google_apis/gcm/engine/gcm_store.cc » ('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 4387042a8447cbf53d794a280cb3b135149d48c9..659fc7f9d1eaa2950a4732f9c5da87ac9b4b95af 100644
--- a/google_apis/gcm/engine/gcm_store.h
+++ b/google_apis/gcm/engine/gcm_store.h
@@ -15,6 +15,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "google_apis/gcm/base/gcm_export.h"
+#include "google_apis/gcm/engine/registration_info.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
namespace google {
@@ -35,15 +36,6 @@ class GCM_EXPORT GCMStore {
typedef std::map<std::string, linked_ptr<google::protobuf::MessageLite> >
OutgoingMessageMap;
- // Part of load results storing user serial number mapping related values.
- struct GCM_EXPORT SerialNumberMappings {
- SerialNumberMappings();
- ~SerialNumberMappings();
-
- int64 next_serial_number;
- std::map<std::string, int64> user_serial_numbers;
- };
-
// Container for Load(..) results.
struct GCM_EXPORT LoadResult {
LoadResult();
@@ -52,9 +44,9 @@ class GCM_EXPORT GCMStore {
bool success;
uint64 device_android_id;
uint64 device_security_token;
+ RegistrationInfoMap registrations;
std::vector<std::string> incoming_messages;
OutgoingMessageMap outgoing_messages;
- SerialNumberMappings serial_number_mappings;
};
typedef std::vector<std::string> PersistentIdList;
@@ -79,6 +71,13 @@ 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,
+ const UpdateCallback& callback) = 0;
+ virtual void RemoveRegistration(const std::string& app_id,
+ const UpdateCallback& callback) = 0;
+
// Unacknowledged incoming message handling.
virtual void AddIncomingMessage(const std::string& persistent_id,
const UpdateCallback& callback) = 0;
@@ -102,15 +101,6 @@ class GCM_EXPORT GCMStore {
virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids,
const UpdateCallback& callback) = 0;
- // User serial number handling.
- virtual void SetNextSerialNumber(int64 next_serial_number,
- const UpdateCallback& callback) = 0;
- virtual void AddUserSerialNumber(const std::string& username,
- int64 serial_number,
- const UpdateCallback& callback) = 0;
- virtual void RemoveUserSerialNumber(const std::string& username,
- const UpdateCallback& callback) = 0;
-
private:
DISALLOW_COPY_AND_ASSIGN(GCMStore);
};
« no previous file with comments | « chrome/common/pref_names.cc ('k') | google_apis/gcm/engine/gcm_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698