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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const std::set<std::string>& accounts, | 81 const std::set<std::string>& accounts, |
82 const UpdateCallback& callback) OVERRIDE; | 82 const UpdateCallback& callback) OVERRIDE; |
83 | 83 |
84 // G-service settings handling. | 84 // G-service settings handling. |
85 virtual void SetGServicesSettings( | 85 virtual void SetGServicesSettings( |
86 const std::map<std::string, std::string>& settings, | 86 const std::map<std::string, std::string>& settings, |
87 const std::string& settings_digest, | 87 const std::string& settings_digest, |
88 const UpdateCallback& callback) OVERRIDE; | 88 const UpdateCallback& callback) OVERRIDE; |
89 | 89 |
90 // Sets the account information related to device to account mapping. | 90 // Sets the account information related to device to account mapping. |
91 virtual void AddAccountMapping(const AccountInfo& account_info, | 91 virtual void AddAccountMapping(const AccountMapping& account_mapping, |
92 const UpdateCallback& callback) OVERRIDE; | 92 const UpdateCallback& callback) OVERRIDE; |
93 virtual void RemoveAccountMapping(const std::string& account_id, | 93 virtual void RemoveAccountMapping(const std::string& account_id, |
94 const UpdateCallback& callback) OVERRIDE; | 94 const UpdateCallback& callback) OVERRIDE; |
95 | 95 |
96 private: | 96 private: |
97 typedef std::map<std::string, int> AppIdToMessageCountMap; | 97 typedef std::map<std::string, int> AppIdToMessageCountMap; |
98 | 98 |
99 // Continuation to update the per-app message counts after a load. | 99 // Continuation to update the per-app message counts after a load. |
100 void LoadContinuation(const LoadCallback& callback, | 100 void LoadContinuation(const LoadCallback& callback, |
101 scoped_ptr<LoadResult> result); | 101 scoped_ptr<LoadResult> result); |
(...skipping 22 matching lines...) Expand all Loading... |
124 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 124 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
125 | 125 |
126 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; | 126 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); | 128 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace gcm | 131 } // namespace gcm |
132 | 132 |
133 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 133 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
OLD | NEW |