OLD | NEW |
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_IMPL_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 OVERRIDE; | 71 OVERRIDE; |
72 virtual void RemoveOutgoingMessage(const std::string& persistent_id, | 72 virtual void RemoveOutgoingMessage(const std::string& persistent_id, |
73 const UpdateCallback& callback) OVERRIDE; | 73 const UpdateCallback& callback) OVERRIDE; |
74 virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids, | 74 virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids, |
75 const UpdateCallback& callback) OVERRIDE; | 75 const UpdateCallback& callback) OVERRIDE; |
76 | 76 |
77 // Sets last device's checkin time. | 77 // Sets last device's checkin time. |
78 virtual void SetLastCheckinTime(const base::Time& last_checkin_time, | 78 virtual void SetLastCheckinTime(const base::Time& last_checkin_time, |
79 const UpdateCallback& callback) OVERRIDE; | 79 const UpdateCallback& callback) OVERRIDE; |
80 | 80 |
| 81 // G-service settings handling. |
| 82 virtual void SetGServicesSettings( |
| 83 const std::map<std::string, std::string>& settings, |
| 84 const std::string& settings_digest, |
| 85 const UpdateCallback& callback) OVERRIDE; |
| 86 |
81 private: | 87 private: |
82 typedef std::map<std::string, int> AppIdToMessageCountMap; | 88 typedef std::map<std::string, int> AppIdToMessageCountMap; |
83 | 89 |
84 // Continuation to update the per-app message counts after a load. | 90 // Continuation to update the per-app message counts after a load. |
85 void LoadContinuation(const LoadCallback& callback, | 91 void LoadContinuation(const LoadCallback& callback, |
86 scoped_ptr<LoadResult> result); | 92 scoped_ptr<LoadResult> result); |
87 | 93 |
88 // Continuation to update the per-app message counts when adding messages. | 94 // Continuation to update the per-app message counts when adding messages. |
89 // In particular, if a message fails to add, the message count is decremented. | 95 // In particular, if a message fails to add, the message count is decremented. |
90 void AddOutgoingMessageContinuation(const UpdateCallback& callback, | 96 void AddOutgoingMessageContinuation(const UpdateCallback& callback, |
(...skipping 18 matching lines...) Expand all Loading... |
109 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 115 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
110 | 116 |
111 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; | 117 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; |
112 | 118 |
113 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); | 119 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); |
114 }; | 120 }; |
115 | 121 |
116 } // namespace gcm | 122 } // namespace gcm |
117 | 123 |
118 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 124 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
OLD | NEW |