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

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

Issue 429073002: [GCM] Persistence of account mappings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing the gn build Created 6 years, 4 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/BUILD.gn ('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 ca02850bfbbff70995720cd12b244395ed1195a6..33d6916cd0b3424f7dc4876b4e47761f5ea5db26 100644
--- a/google_apis/gcm/engine/gcm_store.h
+++ b/google_apis/gcm/engine/gcm_store.h
@@ -19,6 +19,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "google_apis/gcm/base/gcm_export.h"
+#include "google_apis/gcm/engine/account_info.h"
#include "google_apis/gcm/engine/registration_info.h"
namespace gcm {
@@ -33,11 +34,16 @@ class GCM_EXPORT GCMStore {
typedef std::map<std::string, linked_ptr<google::protobuf::MessageLite> >
OutgoingMessageMap;
+ // Map of account id to account info for account mappings.
+ typedef std::map<std::string, AccountInfo> AccountInfoMap;
+
// Container for Load(..) results.
struct GCM_EXPORT LoadResult {
LoadResult();
~LoadResult();
+ void Reset();
+
bool success;
uint64 device_android_id;
uint64 device_security_token;
@@ -48,6 +54,7 @@ class GCM_EXPORT GCMStore {
std::string gservices_digest;
base::Time last_checkin_time;
std::set<std::string> last_checkin_accounts;
+ AccountInfoMap account_infos;
};
typedef std::vector<std::string> PersistentIdList;
@@ -102,7 +109,7 @@ class GCM_EXPORT GCMStore {
virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids,
const UpdateCallback& callback) = 0;
- // Sets last device's checkin time.
+ // Sets last device's checkin information.
virtual void SetLastCheckinInfo(const base::Time& time,
const std::set<std::string>& accounts,
const UpdateCallback& callback) = 0;
@@ -115,6 +122,12 @@ class GCM_EXPORT GCMStore {
const std::string& settings_digest,
const UpdateCallback& callback) = 0;
+ // Sets the account information related to device to account mapping.
+ virtual void AddAccountMapping(const AccountInfo& account_info,
+ const UpdateCallback& callback) = 0;
+ virtual void RemoveAccountMapping(const std::string& account_id,
+ const UpdateCallback& callback) = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(GCMStore);
};
« no previous file with comments | « google_apis/gcm/BUILD.gn ('k') | google_apis/gcm/engine/gcm_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698