| 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_IMPL_H_ | 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ |
| 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ | 6 #define GOOGLE_APIS_GCM_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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // Checkins. It also allows for registering user delegates that host | 74 // Checkins. It also allows for registering user delegates that host |
| 75 // applications that send and receive messages. | 75 // applications that send and receive messages. |
| 76 class GCM_EXPORT GCMClientImpl | 76 class GCM_EXPORT GCMClientImpl |
| 77 : public GCMClient, public GCMStatsRecorder::Delegate { | 77 : public GCMClient, public GCMStatsRecorder::Delegate { |
| 78 public: | 78 public: |
| 79 explicit GCMClientImpl(scoped_ptr<GCMInternalsBuilder> internals_builder); | 79 explicit GCMClientImpl(scoped_ptr<GCMInternalsBuilder> internals_builder); |
| 80 virtual ~GCMClientImpl(); | 80 virtual ~GCMClientImpl(); |
| 81 | 81 |
| 82 // Overridden from GCMClient: | 82 // Overridden from GCMClient: |
| 83 virtual void Initialize( | 83 virtual void Initialize( |
| 84 const checkin_proto::ChromeBuildProto& chrome_build_proto, | 84 const ChromeBuildInfo& chrome_build_info, |
| 85 const base::FilePath& store_path, | 85 const base::FilePath& store_path, |
| 86 const std::vector<std::string>& account_ids, | 86 const std::vector<std::string>& account_ids, |
| 87 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 87 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
| 88 const scoped_refptr<net::URLRequestContextGetter>& | 88 const scoped_refptr<net::URLRequestContextGetter>& |
| 89 url_request_context_getter, | 89 url_request_context_getter, |
| 90 scoped_ptr<Encryptor> encryptor, | 90 scoped_ptr<Encryptor> encryptor, |
| 91 GCMClient::Delegate* delegate) OVERRIDE; | 91 GCMClient::Delegate* delegate) OVERRIDE; |
| 92 virtual void Start() OVERRIDE; | 92 virtual void Start() OVERRIDE; |
| 93 virtual void Stop() OVERRIDE; | 93 virtual void Stop() OVERRIDE; |
| 94 virtual void CheckOut() OVERRIDE; | 94 virtual void CheckOut() OVERRIDE; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 // Device checkin info (android ID and security token used by device). | 243 // Device checkin info (android ID and security token used by device). |
| 244 CheckinInfo device_checkin_info_; | 244 CheckinInfo device_checkin_info_; |
| 245 | 245 |
| 246 // Clock used for timing of retry logic. Passed in for testing. Owned by | 246 // Clock used for timing of retry logic. Passed in for testing. Owned by |
| 247 // GCMClientImpl. | 247 // GCMClientImpl. |
| 248 scoped_ptr<base::Clock> clock_; | 248 scoped_ptr<base::Clock> clock_; |
| 249 | 249 |
| 250 // Information about the chrome build. | 250 // Information about the chrome build. |
| 251 // TODO(fgorski): Check if it can be passed in constructor and made const. | 251 // TODO(fgorski): Check if it can be passed in constructor and made const. |
| 252 checkin_proto::ChromeBuildProto chrome_build_proto_; | 252 ChromeBuildInfo chrome_build_info_; |
| 253 | 253 |
| 254 // Persistent data store for keeping device credentials, messages and user to | 254 // Persistent data store for keeping device credentials, messages and user to |
| 255 // serial number mappings. | 255 // serial number mappings. |
| 256 scoped_ptr<GCMStore> gcm_store_; | 256 scoped_ptr<GCMStore> gcm_store_; |
| 257 | 257 |
| 258 scoped_refptr<net::HttpNetworkSession> network_session_; | 258 scoped_refptr<net::HttpNetworkSession> network_session_; |
| 259 net::BoundNetLog net_log_; | 259 net::BoundNetLog net_log_; |
| 260 scoped_ptr<ConnectionFactory> connection_factory_; | 260 scoped_ptr<ConnectionFactory> connection_factory_; |
| 261 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | 261 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
| 262 | 262 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 292 | 292 |
| 293 // Factory for creating references in callbacks. | 293 // Factory for creating references in callbacks. |
| 294 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; | 294 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; |
| 295 | 295 |
| 296 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); | 296 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); |
| 297 }; | 297 }; |
| 298 | 298 |
| 299 } // namespace gcm | 299 } // namespace gcm |
| 300 | 300 |
| 301 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ | 301 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_IMPL_H_ |
| OLD | NEW |