| Index: components/gcm_driver/fake_gcm_client.h
|
| diff --git a/components/gcm_driver/fake_gcm_client.h b/components/gcm_driver/fake_gcm_client.h
|
| index 251b0fd5b22fe49d83ff94857fae1f775510d225..bd1d3ec9529b15856c128a1c65ce87f722fefc69 100644
|
| --- a/components/gcm_driver/fake_gcm_client.h
|
| +++ b/components/gcm_driver/fake_gcm_client.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "components/gcm_driver/gcm_client.h"
|
| +#include "components/gcm_driver/gcm_message_status.h"
|
| #include "components/gcm_driver/gcm_stats_recorder_impl.h"
|
|
|
| namespace base {
|
| @@ -87,6 +88,7 @@ class FakeGCMClient : public GCMClient {
|
| // Simulate receiving something from the server.
|
| // Called on UI thread.
|
| void ReceiveMessage(const std::string& app_id,
|
| + const std::string& message_id,
|
| const IncomingMessage& message);
|
| void DeleteMessages(const std::string& app_id);
|
|
|
| @@ -94,6 +96,10 @@ class FakeGCMClient : public GCMClient {
|
| start_mode_overridding_ = overridding;
|
| }
|
|
|
| + const std::string& receipt_app_id() const { return receipt_app_id_; }
|
| + const std::string& receipt_message_id() const { return receipt_message_id_; }
|
| + GCMMessageStatus receipt_status() const { return receipt_status_; }
|
| +
|
| private:
|
| // Called on IO thread.
|
| void DoStart();
|
| @@ -105,12 +111,16 @@ class FakeGCMClient : public GCMClient {
|
| const linked_ptr<RegistrationInfo>& registration_info);
|
| void SendFinished(const std::string& app_id, const OutgoingMessage& message);
|
| void MessageReceived(const std::string& app_id,
|
| - const IncomingMessage& message);
|
| + const IncomingMessage& message,
|
| + const MessageReceiptCallback& optional_receipt_callback);
|
| void MessagesDeleted(const std::string& app_id);
|
| void MessageSendError(const std::string& app_id,
|
| const SendErrorDetails& send_error_details);
|
| void SendAcknowledgement(const std::string& app_id,
|
| const std::string& message_id);
|
| + void SendMessageReceipt(const std::string& message_id,
|
| + const std::string& app_id,
|
| + GCMMessageStatus status);
|
|
|
| Delegate* delegate_;
|
| std::string product_category_for_subtypes_;
|
| @@ -121,6 +131,9 @@ class FakeGCMClient : public GCMClient {
|
| scoped_refptr<base::SequencedTaskRunner> io_thread_;
|
| std::map<std::string, std::pair<std::string, std::string>> instance_id_data_;
|
| GCMStatsRecorderImpl recorder_;
|
| + std::string receipt_app_id_;
|
| + std::string receipt_message_id_;
|
| + GCMMessageStatus receipt_status_;
|
| base::WeakPtrFactory<FakeGCMClient> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeGCMClient);
|
|
|