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

Side by Side Diff: google_apis/gcm/engine/gcm_store.h

Issue 183013007: [GCM] Stop/restart GCM when the state is forced off/on (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | google_apis/gcm/engine/gcm_store_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_
6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 typedef base::Callback<void(scoped_ptr<LoadResult> result)> LoadCallback; 61 typedef base::Callback<void(scoped_ptr<LoadResult> result)> LoadCallback;
62 typedef base::Callback<void(bool success)> UpdateCallback; 62 typedef base::Callback<void(bool success)> UpdateCallback;
63 63
64 GCMStore(); 64 GCMStore();
65 virtual ~GCMStore(); 65 virtual ~GCMStore();
66 66
67 // Load the data from persistent store and pass the initial state back to 67 // Load the data from persistent store and pass the initial state back to
68 // caller. 68 // caller.
69 virtual void Load(const LoadCallback& callback) = 0; 69 virtual void Load(const LoadCallback& callback) = 0;
70 70
71 // Close the persistent store.
72 virtual void Close() = 0;
73
71 // Clears the GCM store of all data. 74 // Clears the GCM store of all data.
72 virtual void Destroy(const UpdateCallback& callback) = 0; 75 virtual void Destroy(const UpdateCallback& callback) = 0;
73 76
74 // Sets this device's messaging credentials. 77 // Sets this device's messaging credentials.
75 virtual void SetDeviceCredentials(uint64 device_android_id, 78 virtual void SetDeviceCredentials(uint64 device_android_id,
76 uint64 device_security_token, 79 uint64 device_security_token,
77 const UpdateCallback& callback) = 0; 80 const UpdateCallback& callback) = 0;
78 81
79 // Unacknowledged incoming message handling. 82 // Unacknowledged incoming message handling.
80 virtual void AddIncomingMessage(const std::string& persistent_id, 83 virtual void AddIncomingMessage(const std::string& persistent_id,
(...skipping 27 matching lines...) Expand all
108 virtual void RemoveUserSerialNumber(const std::string& username, 111 virtual void RemoveUserSerialNumber(const std::string& username,
109 const UpdateCallback& callback) = 0; 112 const UpdateCallback& callback) = 0;
110 113
111 private: 114 private:
112 DISALLOW_COPY_AND_ASSIGN(GCMStore); 115 DISALLOW_COPY_AND_ASSIGN(GCMStore);
113 }; 116 };
114 117
115 } // namespace gcm 118 } // namespace gcm
116 119
117 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_ 120 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | google_apis/gcm/engine/gcm_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698