OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_GCM_CLIENT_H_ | 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // response to events and messages. | 178 // response to events and messages. |
179 virtual void Initialize( | 179 virtual void Initialize( |
180 const checkin_proto::ChromeBuildProto& chrome_build_proto, | 180 const checkin_proto::ChromeBuildProto& chrome_build_proto, |
181 const base::FilePath& store_path, | 181 const base::FilePath& store_path, |
182 const std::vector<std::string>& account_ids, | 182 const std::vector<std::string>& account_ids, |
183 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 183 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
184 const scoped_refptr<net::URLRequestContextGetter>& | 184 const scoped_refptr<net::URLRequestContextGetter>& |
185 url_request_context_getter, | 185 url_request_context_getter, |
186 Delegate* delegate) = 0; | 186 Delegate* delegate) = 0; |
187 | 187 |
188 // Loads the data from the persistent store. This will automatically kick off | 188 // Starts the GCM service by first loading the data from the persistent store. |
189 // the check-in if the check-in info is not found in the store. | 189 // This will then kick off the check-in if the check-in info is not found in |
190 // TODO(jianli): consider renaming this name to Start. | 190 // the store. |
191 virtual void Load() = 0; | 191 virtual void Start() = 0; |
192 | 192 |
193 // Stops using the GCM service. This will not erase the persisted data. | 193 // Stops using the GCM service. This will not erase the persisted data. |
194 virtual void Stop() = 0; | 194 virtual void Stop() = 0; |
195 | 195 |
196 // Checks out of the GCM service. This will erase all the cached and persisted | 196 // Checks out of the GCM service. This will erase all the cached and persisted |
197 // data. | 197 // data. |
198 virtual void CheckOut() = 0; | 198 virtual void CheckOut() = 0; |
199 | 199 |
200 // Registers the application for GCM. Delegate::OnRegisterFinished will be | 200 // Registers the application for GCM. Delegate::OnRegisterFinished will be |
201 // called asynchronously upon completion. | 201 // called asynchronously upon completion. |
(...skipping 25 matching lines...) Expand all Loading... |
227 // Clear all recorded GCM activity logs. | 227 // Clear all recorded GCM activity logs. |
228 virtual void ClearActivityLogs() = 0; | 228 virtual void ClearActivityLogs() = 0; |
229 | 229 |
230 // Gets internal states and statistics. | 230 // Gets internal states and statistics. |
231 virtual GCMStatistics GetStatistics() const = 0; | 231 virtual GCMStatistics GetStatistics() const = 0; |
232 }; | 232 }; |
233 | 233 |
234 } // namespace gcm | 234 } // namespace gcm |
235 | 235 |
236 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 236 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
OLD | NEW |