Chromium Code Reviews| 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 83ec73de0ec14f30d6d824557041788faa4364a1..e3dd58fbc819a06e16b93b994d91c8b46fba588a 100644 |
| --- a/google_apis/gcm/engine/gcm_store.h |
| +++ b/google_apis/gcm/engine/gcm_store.h |
| @@ -29,6 +29,11 @@ class MCSMessage; |
| // as well as store device and user checkin information. |
| class GCM_EXPORT GCMStore { |
| public: |
| + enum StoreOpenMode { |
| + DO_NOT_CREATE_NEW_STORE, |
| + CREATE_NEW_STORE_IF_NOT_EXISTS |
|
Nicolas Zea
2015/06/15 17:58:37
nit: CREATE_IF_MISSING (which is the variable you
jianli
2015/06/15 20:50:23
Done.
|
| + }; |
| + |
| // Map of message id to message data for outgoing messages. |
| typedef std::map<std::string, linked_ptr<google::protobuf::MessageLite> > |
| OutgoingMessageMap; |
| @@ -44,6 +49,7 @@ class GCM_EXPORT GCMStore { |
| void Reset(); |
| bool success; |
| + bool store_does_not_exist; |
| uint64 device_android_id; |
| uint64 device_security_token; |
| std::map<std::string, std::string> registrations; |
| @@ -68,7 +74,7 @@ class GCM_EXPORT GCMStore { |
| // Load the data from persistent store and pass the initial state back to |
| // caller. |
| - virtual void Load(const LoadCallback& callback) = 0; |
| + virtual void Load(StoreOpenMode open_mode, const LoadCallback& callback) = 0; |
| // Close the persistent store. |
| virtual void Close() = 0; |