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_IMPL_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 : public GCMClient, public GCMStatsRecorder::Delegate, | 77 : public GCMClient, public GCMStatsRecorder::Delegate, |
78 public ConnectionFactory::ConnectionListener { | 78 public ConnectionFactory::ConnectionListener { |
79 public: | 79 public: |
80 explicit GCMClientImpl(scoped_ptr<GCMInternalsBuilder> internals_builder); | 80 explicit GCMClientImpl(scoped_ptr<GCMInternalsBuilder> internals_builder); |
81 virtual ~GCMClientImpl(); | 81 virtual ~GCMClientImpl(); |
82 | 82 |
83 // GCMClient implementation. | 83 // GCMClient implementation. |
84 virtual void Initialize( | 84 virtual void Initialize( |
85 const ChromeBuildInfo& chrome_build_info, | 85 const ChromeBuildInfo& chrome_build_info, |
86 const base::FilePath& store_path, | 86 const base::FilePath& store_path, |
87 const std::vector<std::string>& account_ids, | |
88 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 87 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
89 const scoped_refptr<net::URLRequestContextGetter>& | 88 const scoped_refptr<net::URLRequestContextGetter>& |
90 url_request_context_getter, | 89 url_request_context_getter, |
91 scoped_ptr<Encryptor> encryptor, | 90 scoped_ptr<Encryptor> encryptor, |
92 GCMClient::Delegate* delegate) OVERRIDE; | 91 GCMClient::Delegate* delegate) OVERRIDE; |
93 virtual void Start() OVERRIDE; | 92 virtual void Start() OVERRIDE; |
94 virtual void Stop() OVERRIDE; | 93 virtual void Stop() OVERRIDE; |
95 virtual void CheckOut() OVERRIDE; | 94 virtual void CheckOut() OVERRIDE; |
96 virtual void Register(const std::string& app_id, | 95 virtual void Register(const std::string& app_id, |
97 const std::vector<std::string>& sender_ids) OVERRIDE; | 96 const std::vector<std::string>& sender_ids) OVERRIDE; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 264 |
266 scoped_refptr<net::HttpNetworkSession> network_session_; | 265 scoped_refptr<net::HttpNetworkSession> network_session_; |
267 net::BoundNetLog net_log_; | 266 net::BoundNetLog net_log_; |
268 scoped_ptr<ConnectionFactory> connection_factory_; | 267 scoped_ptr<ConnectionFactory> connection_factory_; |
269 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | 268 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
270 | 269 |
271 // Controls receiving and sending of packets and reliable message queueing. | 270 // Controls receiving and sending of packets and reliable message queueing. |
272 scoped_ptr<MCSClient> mcs_client_; | 271 scoped_ptr<MCSClient> mcs_client_; |
273 | 272 |
274 scoped_ptr<CheckinRequest> checkin_request_; | 273 scoped_ptr<CheckinRequest> checkin_request_; |
275 std::vector<std::string> account_ids_; | |
276 | 274 |
277 // Cached registration info. | 275 // Cached registration info. |
278 RegistrationInfoMap registrations_; | 276 RegistrationInfoMap registrations_; |
279 | 277 |
280 // Currently pending registration requests. GCMClientImpl owns the | 278 // Currently pending registration requests. GCMClientImpl owns the |
281 // RegistrationRequests. | 279 // RegistrationRequests. |
282 PendingRegistrationRequests pending_registration_requests_; | 280 PendingRegistrationRequests pending_registration_requests_; |
283 STLValueDeleter<PendingRegistrationRequests> | 281 STLValueDeleter<PendingRegistrationRequests> |
284 pending_registration_requests_deleter_; | 282 pending_registration_requests_deleter_; |
285 | 283 |
(...skipping 14 matching lines...) Expand all Loading... |
300 | 298 |
301 // Factory for creating references in callbacks. | 299 // Factory for creating references in callbacks. |
302 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; | 300 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; |
303 | 301 |
304 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); | 302 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); |
305 }; | 303 }; |
306 | 304 |
307 } // namespace gcm | 305 } // namespace gcm |
308 | 306 |
309 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 307 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
OLD | NEW |