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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 const UpdateCallback& callback) OVERRIDE; | 67 const UpdateCallback& callback) OVERRIDE; |
68 virtual void OverwriteOutgoingMessage(const std::string& persistent_id, | 68 virtual void OverwriteOutgoingMessage(const std::string& persistent_id, |
69 const MCSMessage& message, | 69 const MCSMessage& message, |
70 const UpdateCallback& callback) | 70 const UpdateCallback& callback) |
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 // GService Settings handling. |
| 78 virtual void UpdateGServicesSettings( |
| 79 const std::vector<std::string>& settings_to_remove, |
| 80 const std::map<std::string, std::string>& settings_to_add, |
| 81 const UpdateCallback& callback) OVERRIDE; |
| 82 |
77 private: | 83 private: |
78 typedef std::map<std::string, int> AppIdToMessageCountMap; | 84 typedef std::map<std::string, int> AppIdToMessageCountMap; |
79 | 85 |
80 // Continuation to update the per-app message counts after a load. | 86 // Continuation to update the per-app message counts after a load. |
81 void LoadContinuation(const LoadCallback& callback, | 87 void LoadContinuation(const LoadCallback& callback, |
82 scoped_ptr<LoadResult> result); | 88 scoped_ptr<LoadResult> result); |
83 | 89 |
84 // Continuation to update the per-app message counts when adding messages. | 90 // Continuation to update the per-app message counts when adding messages. |
85 // In particular, if a message fails to add, the message count is decremented. | 91 // In particular, if a message fails to add, the message count is decremented. |
86 void AddOutgoingMessageContinuation(const UpdateCallback& callback, | 92 void AddOutgoingMessageContinuation(const UpdateCallback& callback, |
(...skipping 18 matching lines...) Expand all Loading... |
105 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 111 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
106 | 112 |
107 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; | 113 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; |
108 | 114 |
109 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); | 115 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); |
110 }; | 116 }; |
111 | 117 |
112 } // namespace gcm | 118 } // namespace gcm |
113 | 119 |
114 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 120 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
OLD | NEW |