| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 virtual void OnActivityRecorded() = 0; | 191 virtual void OnActivityRecorded() = 0; |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 GCMClient(); | 194 GCMClient(); |
| 195 virtual ~GCMClient(); | 195 virtual ~GCMClient(); |
| 196 | 196 |
| 197 // Begins initialization of the GCM Client. This will not trigger a | 197 // Begins initialization of the GCM Client. This will not trigger a |
| 198 // connection. | 198 // connection. |
| 199 // |chrome_build_info|: chrome info, i.e., version, channel and etc. | 199 // |chrome_build_info|: chrome info, i.e., version, channel and etc. |
| 200 // |store_path|: path to the GCM store. | 200 // |store_path|: path to the GCM store. |
| 201 // |account_ids|: account IDs to be related to the device when checking in. | |
| 202 // |blocking_task_runner|: for running blocking file tasks. | 201 // |blocking_task_runner|: for running blocking file tasks. |
| 203 // |url_request_context_getter|: for url requests. | 202 // |url_request_context_getter|: for url requests. |
| 204 // |delegate|: the delegate whose methods will be called asynchronously in | 203 // |delegate|: the delegate whose methods will be called asynchronously in |
| 205 // response to events and messages. | 204 // response to events and messages. |
| 206 virtual void Initialize( | 205 virtual void Initialize( |
| 207 const ChromeBuildInfo& chrome_build_info, | 206 const ChromeBuildInfo& chrome_build_info, |
| 208 const base::FilePath& store_path, | 207 const base::FilePath& store_path, |
| 209 const std::vector<std::string>& account_ids, | |
| 210 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 208 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
| 211 const scoped_refptr<net::URLRequestContextGetter>& | 209 const scoped_refptr<net::URLRequestContextGetter>& |
| 212 url_request_context_getter, | 210 url_request_context_getter, |
| 213 scoped_ptr<Encryptor> encryptor, | 211 scoped_ptr<Encryptor> encryptor, |
| 214 Delegate* delegate) = 0; | 212 Delegate* delegate) = 0; |
| 215 | 213 |
| 216 // Starts the GCM service by first loading the data from the persistent store. | 214 // Starts the GCM service by first loading the data from the persistent store. |
| 217 // This will then kick off the check-in if the check-in info is not found in | 215 // This will then kick off the check-in if the check-in info is not found in |
| 218 // the store. | 216 // the store. |
| 219 virtual void Start() = 0; | 217 virtual void Start() = 0; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // Clear all recorded GCM activity logs. | 253 // Clear all recorded GCM activity logs. |
| 256 virtual void ClearActivityLogs() = 0; | 254 virtual void ClearActivityLogs() = 0; |
| 257 | 255 |
| 258 // Gets internal states and statistics. | 256 // Gets internal states and statistics. |
| 259 virtual GCMStatistics GetStatistics() const = 0; | 257 virtual GCMStatistics GetStatistics() const = 0; |
| 260 }; | 258 }; |
| 261 | 259 |
| 262 } // namespace gcm | 260 } // namespace gcm |
| 263 | 261 |
| 264 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 262 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| OLD | NEW |