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

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

Issue 215363007: [GCM] Adding basic G-services handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Converting service write to the store to a full replace, adding digest to checkin request, addressi… 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
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 659fc7f9d1eaa2950a4732f9c5da87ac9b4b95af..bb328528c304b1f7e2a5b805036a629c6b318377 100644
--- a/google_apis/gcm/engine/gcm_store.h
+++ b/google_apis/gcm/engine/gcm_store.h
@@ -14,6 +14,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/time/time.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"
@@ -47,6 +48,9 @@ class GCM_EXPORT GCMStore {
RegistrationInfoMap registrations;
std::vector<std::string> incoming_messages;
OutgoingMessageMap outgoing_messages;
+ std::map<std::string, std::string> gservices_settings;
+ std::string gservices_digest;
+ base::Time last_checkin_time;
};
typedef std::vector<std::string> PersistentIdList;
@@ -101,6 +105,15 @@ class GCM_EXPORT GCMStore {
virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids,
const UpdateCallback& callback) = 0;
+ // GService Settings handling.
+ // |settings_to_remove| and |settings_to_add| don't need to be mutually
jianli 2014/04/01 20:17:17 nit: update the comment
fgorski 2014/04/01 20:47:54 Done.
+ // exclusive. This will happen when the whole settings map is replaced.
+ virtual void UpdateGServicesSettings(
+ const std::map<std::string, std::string>& settings_to_add,
jianli 2014/04/01 20:17:17 |settings_to_add| means something new to add. Prob
fgorski 2014/04/01 20:47:54 Done.
+ const std::string& settings_digest,
+ const base::Time& last_checkin_time,
+ const UpdateCallback& callback) = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(GCMStore);
};

Powered by Google App Engine
This is Rietveld 408576698