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 COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 virtual void OnDisconnected() = 0; | 201 virtual void OnDisconnected() = 0; |
202 }; | 202 }; |
203 | 203 |
204 GCMClient(); | 204 GCMClient(); |
205 virtual ~GCMClient(); | 205 virtual ~GCMClient(); |
206 | 206 |
207 // Begins initialization of the GCM Client. This will not trigger a | 207 // Begins initialization of the GCM Client. This will not trigger a |
208 // connection. | 208 // connection. |
209 // |chrome_build_info|: chrome info, i.e., version, channel and etc. | 209 // |chrome_build_info|: chrome info, i.e., version, channel and etc. |
210 // |store_path|: path to the GCM store. | 210 // |store_path|: path to the GCM store. |
211 // |account_ids|: account IDs to be related to the device when checking in. | |
212 // |blocking_task_runner|: for running blocking file tasks. | 211 // |blocking_task_runner|: for running blocking file tasks. |
213 // |url_request_context_getter|: for url requests. | 212 // |url_request_context_getter|: for url requests. |
214 // |delegate|: the delegate whose methods will be called asynchronously in | 213 // |delegate|: the delegate whose methods will be called asynchronously in |
215 // response to events and messages. | 214 // response to events and messages. |
216 virtual void Initialize( | 215 virtual void Initialize( |
217 const ChromeBuildInfo& chrome_build_info, | 216 const ChromeBuildInfo& chrome_build_info, |
218 const base::FilePath& store_path, | 217 const base::FilePath& store_path, |
219 const std::vector<std::string>& account_ids, | |
220 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 218 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
221 const scoped_refptr<net::URLRequestContextGetter>& | 219 const scoped_refptr<net::URLRequestContextGetter>& |
222 url_request_context_getter, | 220 url_request_context_getter, |
223 scoped_ptr<Encryptor> encryptor, | 221 scoped_ptr<Encryptor> encryptor, |
224 Delegate* delegate) = 0; | 222 Delegate* delegate) = 0; |
225 | 223 |
226 // Starts the GCM service by first loading the data from the persistent store. | 224 // Starts the GCM service by first loading the data from the persistent store. |
227 // This will then kick off the check-in if the check-in info is not found in | 225 // This will then kick off the check-in if the check-in info is not found in |
228 // the store. | 226 // the store. |
229 virtual void Start() = 0; | 227 virtual void Start() = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 // Clear all recorded GCM activity logs. | 263 // Clear all recorded GCM activity logs. |
266 virtual void ClearActivityLogs() = 0; | 264 virtual void ClearActivityLogs() = 0; |
267 | 265 |
268 // Gets internal states and statistics. | 266 // Gets internal states and statistics. |
269 virtual GCMStatistics GetStatistics() const = 0; | 267 virtual GCMStatistics GetStatistics() const = 0; |
270 }; | 268 }; |
271 | 269 |
272 } // namespace gcm | 270 } // namespace gcm |
273 | 271 |
274 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 272 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
OLD | NEW |