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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <utility> | 14 #include <utility> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 #include "components/gcm_driver/gcm_client.h" | 21 #include "components/gcm_driver/gcm_client.h" |
| 22 #include "components/gcm_driver/gcm_message_status.h" |
22 #include "components/gcm_driver/gcm_stats_recorder_impl.h" | 23 #include "components/gcm_driver/gcm_stats_recorder_impl.h" |
23 #include "google_apis/gcm/base/mcs_message.h" | 24 #include "google_apis/gcm/base/mcs_message.h" |
24 #include "google_apis/gcm/engine/gcm_store.h" | 25 #include "google_apis/gcm/engine/gcm_store.h" |
25 #include "google_apis/gcm/engine/gservices_settings.h" | 26 #include "google_apis/gcm/engine/gservices_settings.h" |
26 #include "google_apis/gcm/engine/mcs_client.h" | 27 #include "google_apis/gcm/engine/mcs_client.h" |
27 #include "google_apis/gcm/engine/registration_request.h" | 28 #include "google_apis/gcm/engine/registration_request.h" |
28 #include "google_apis/gcm/engine/unregistration_request.h" | 29 #include "google_apis/gcm/engine/unregistration_request.h" |
29 #include "google_apis/gcm/protocol/android_checkin.pb.h" | 30 #include "google_apis/gcm/protocol/android_checkin.pb.h" |
30 #include "google_apis/gcm/protocol/checkin.pb.h" | 31 #include "google_apis/gcm/protocol/checkin.pb.h" |
31 #include "net/http/http_status_code.h" | 32 #include "net/http/http_status_code.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 std::unique_ptr<Encryptor> encryptor, | 115 std::unique_ptr<Encryptor> encryptor, |
115 GCMClient::Delegate* delegate) override; | 116 GCMClient::Delegate* delegate) override; |
116 void Start(StartMode start_mode) override; | 117 void Start(StartMode start_mode) override; |
117 void Stop() override; | 118 void Stop() override; |
118 void Register(const linked_ptr<RegistrationInfo>& registration_info) override; | 119 void Register(const linked_ptr<RegistrationInfo>& registration_info) override; |
119 void Unregister( | 120 void Unregister( |
120 const linked_ptr<RegistrationInfo>& registration_info) override; | 121 const linked_ptr<RegistrationInfo>& registration_info) override; |
121 void Send(const std::string& app_id, | 122 void Send(const std::string& app_id, |
122 const std::string& receiver_id, | 123 const std::string& receiver_id, |
123 const OutgoingMessage& message) override; | 124 const OutgoingMessage& message) override; |
| 125 void SendMessageReceipt(const std::string& message_id, |
| 126 const std::string& app_id, |
| 127 GCMMessageStatus status) override; |
124 void RecordDecryptionFailure(const std::string& app_id, | 128 void RecordDecryptionFailure(const std::string& app_id, |
125 GCMEncryptionProvider::DecryptionResult result) | 129 GCMEncryptionProvider::DecryptionResult result) |
126 override; | 130 override; |
127 void SetRecording(bool recording) override; | 131 void SetRecording(bool recording) override; |
128 void ClearActivityLogs() override; | 132 void ClearActivityLogs() override; |
129 GCMStatistics GetStatistics() const override; | 133 GCMStatistics GetStatistics() const override; |
130 void SetAccountTokens( | 134 void SetAccountTokens( |
131 const std::vector<AccountTokenInfo>& account_tokens) override; | 135 const std::vector<AccountTokenInfo>& account_tokens) override; |
132 void UpdateAccountMapping(const AccountMapping& account_mapping) override; | 136 void UpdateAccountMapping(const AccountMapping& account_mapping) override; |
133 void RemoveAccountMapping(const std::string& account_id) override; | 137 void RemoveAccountMapping(const std::string& account_id) override; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 405 |
402 // Factory for creating references in callbacks. | 406 // Factory for creating references in callbacks. |
403 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; | 407 base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_; |
404 | 408 |
405 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); | 409 DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); |
406 }; | 410 }; |
407 | 411 |
408 } // namespace gcm | 412 } // namespace gcm |
409 | 413 |
410 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ | 414 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_IMPL_H_ |
OLD | NEW |