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

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

Issue 378643002: [GCM] Check-in with signed in accounts associates device to user (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing compilation issue on android Created 6 years, 5 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
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 28 matching lines...) Expand all
39 39
40 bool success; 40 bool success;
41 uint64 device_android_id; 41 uint64 device_android_id;
42 uint64 device_security_token; 42 uint64 device_security_token;
43 RegistrationInfoMap registrations; 43 RegistrationInfoMap registrations;
44 std::vector<std::string> incoming_messages; 44 std::vector<std::string> incoming_messages;
45 OutgoingMessageMap outgoing_messages; 45 OutgoingMessageMap outgoing_messages;
46 std::map<std::string, std::string> gservices_settings; 46 std::map<std::string, std::string> gservices_settings;
47 std::string gservices_digest; 47 std::string gservices_digest;
48 base::Time last_checkin_time; 48 base::Time last_checkin_time;
49 uint64 accounts_count;
49 }; 50 };
50 51
51 typedef std::vector<std::string> PersistentIdList; 52 typedef std::vector<std::string> PersistentIdList;
52 typedef base::Callback<void(scoped_ptr<LoadResult> result)> LoadCallback; 53 typedef base::Callback<void(scoped_ptr<LoadResult> result)> LoadCallback;
53 typedef base::Callback<void(bool success)> UpdateCallback; 54 typedef base::Callback<void(bool success)> UpdateCallback;
54 55
55 GCMStore(); 56 GCMStore();
56 virtual ~GCMStore(); 57 virtual ~GCMStore();
57 58
58 // Load the data from persistent store and pass the initial state back to 59 // Load the data from persistent store and pass the initial state back to
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 const UpdateCallback& callback) = 0; 95 const UpdateCallback& callback) = 0;
95 virtual void OverwriteOutgoingMessage(const std::string& persistent_id, 96 virtual void OverwriteOutgoingMessage(const std::string& persistent_id,
96 const MCSMessage& message, 97 const MCSMessage& message,
97 const UpdateCallback& callback) = 0; 98 const UpdateCallback& callback) = 0;
98 virtual void RemoveOutgoingMessage(const std::string& persistent_id, 99 virtual void RemoveOutgoingMessage(const std::string& persistent_id,
99 const UpdateCallback& callback) = 0; 100 const UpdateCallback& callback) = 0;
100 virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids, 101 virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids,
101 const UpdateCallback& callback) = 0; 102 const UpdateCallback& callback) = 0;
102 103
103 // Sets last device's checkin time. 104 // Sets last device's checkin time.
104 virtual void SetLastCheckinTime(const base::Time& last_checkin_time, 105 virtual void SetLastCheckinInfo(const base::Time& last_checkin_time,
106 uint64 accounts_count,
105 const UpdateCallback& callback) = 0; 107 const UpdateCallback& callback) = 0;
106 108
107 // G-service settings handling. 109 // G-service settings handling.
108 // Persists |settings| and |settings_digest|. It completely replaces the 110 // Persists |settings| and |settings_digest|. It completely replaces the
109 // existing data. 111 // existing data.
110 virtual void SetGServicesSettings( 112 virtual void SetGServicesSettings(
111 const std::map<std::string, std::string>& settings, 113 const std::map<std::string, std::string>& settings,
112 const std::string& settings_digest, 114 const std::string& settings_digest,
113 const UpdateCallback& callback) = 0; 115 const UpdateCallback& callback) = 0;
114 116
115 private: 117 private:
116 DISALLOW_COPY_AND_ASSIGN(GCMStore); 118 DISALLOW_COPY_AND_ASSIGN(GCMStore);
117 }; 119 };
118 120
119 } // namespace gcm 121 } // namespace gcm
120 122
121 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_ 123 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698