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> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "google_apis/gcm/base/mcs_message.h" | 16 #include "google_apis/gcm/base/mcs_message.h" |
17 #include "google_apis/gcm/engine/gcm_store.h" | 17 #include "google_apis/gcm/engine/gcm_store.h" |
18 #include "google_apis/gcm/engine/gservices_settings.h" | 18 #include "google_apis/gcm/engine/gservices_settings.h" |
19 #include "google_apis/gcm/engine/mcs_client.h" | 19 #include "google_apis/gcm/engine/mcs_client.h" |
20 #include "google_apis/gcm/engine/registration_request.h" | 20 #include "google_apis/gcm/engine/registration_request.h" |
21 #include "google_apis/gcm/engine/unregistration_request.h" | 21 #include "google_apis/gcm/engine/unregistration_request.h" |
22 #include "google_apis/gcm/gcm_client.h" | 22 #include "google_apis/gcm/gcm_client.h" |
23 #include "google_apis/gcm/monitoring/gcm_stats_recorder.h" | 23 #include "google_apis/gcm/monitoring/gcm_stats_recorder_impl.h" |
24 #include "google_apis/gcm/protocol/android_checkin.pb.h" | 24 #include "google_apis/gcm/protocol/android_checkin.pb.h" |
25 #include "google_apis/gcm/protocol/checkin.pb.h" | 25 #include "google_apis/gcm/protocol/checkin.pb.h" |
26 #include "net/base/net_log.h" | 26 #include "net/base/net_log.h" |
27 #include "net/url_request/url_request_context_getter.h" | 27 #include "net/url_request/url_request_context_getter.h" |
28 | 28 |
29 class GURL; | 29 class GURL; |
30 | 30 |
31 namespace base { | 31 namespace base { |
32 class Clock; | 32 class Clock; |
33 class Time; | 33 class Time; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // Fires OnMessageSendError event on the delegate of this calss, based on the | 226 // Fires OnMessageSendError event on the delegate of this calss, based on the |
227 // details in |data_message_stanza| and |message_data|. | 227 // details in |data_message_stanza| and |message_data|. |
228 void HandleIncomingSendError( | 228 void HandleIncomingSendError( |
229 const mcs_proto::DataMessageStanza& data_message_stanza, | 229 const mcs_proto::DataMessageStanza& data_message_stanza, |
230 MessageData& message_data); | 230 MessageData& message_data); |
231 | 231 |
232 // Builder for the GCM internals (mcs client, etc.). | 232 // Builder for the GCM internals (mcs client, etc.). |
233 scoped_ptr<GCMInternalsBuilder> internals_builder_; | 233 scoped_ptr<GCMInternalsBuilder> internals_builder_; |
234 | 234 |
235 // Recorder that logs GCM activities. | 235 // Recorder that logs GCM activities. |
236 GCMStatsRecorder recorder_; | 236 GCMStatsRecorderImpl recorder_; |
237 | 237 |
238 // State of the GCM Client Implementation. | 238 // State of the GCM Client Implementation. |
239 State state_; | 239 State state_; |
240 | 240 |
241 GCMClient::Delegate* delegate_; | 241 GCMClient::Delegate* delegate_; |
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 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |