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

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

Issue 1183843002: Do not create GCM store if it is not needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback + fix test Created 5 years, 6 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 | « components/gcm_driver/gcm_client_impl_unittest.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 83ec73de0ec14f30d6d824557041788faa4364a1..9375882dbbc3025e71a97676b60cce6ea6c20362 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,
+ CREATE_IF_MISSING
+ };
+
// 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;
« no previous file with comments | « components/gcm_driver/gcm_client_impl_unittest.cc ('k') | google_apis/gcm/engine/gcm_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698