| 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 GOOGLE_APIS_GCM_MONITORING_FAKE_GCM_STATS_RECODER_H_ | 5 #ifndef GOOGLE_APIS_GCM_MONITORING_FAKE_GCM_STATS_RECODER_H_ |
| 6 #define GOOGLE_APIS_GCM_MONITORING_FAKE_GCM_STATS_RECODER_H_ | 6 #define GOOGLE_APIS_GCM_MONITORING_FAKE_GCM_STATS_RECODER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
| 8 #include "google_apis/gcm/monitoring/gcm_stats_recorder.h" | 11 #include "google_apis/gcm/monitoring/gcm_stats_recorder.h" |
| 9 | 12 |
| 10 namespace gcm { | 13 namespace gcm { |
| 11 | 14 |
| 12 // The fake version of GCMStatsRecorder that does nothing. | 15 // The fake version of GCMStatsRecorder that does nothing. |
| 13 class FakeGCMStatsRecorder : public GCMStatsRecorder { | 16 class FakeGCMStatsRecorder : public GCMStatsRecorder { |
| 14 public: | 17 public: |
| 15 FakeGCMStatsRecorder(); | 18 FakeGCMStatsRecorder(); |
| 16 ~FakeGCMStatsRecorder() override; | 19 ~FakeGCMStatsRecorder() override; |
| 17 | 20 |
| 18 void RecordCheckinInitiated(uint64 android_id) override; | 21 void RecordCheckinInitiated(uint64_t android_id) override; |
| 19 void RecordCheckinDelayedDueToBackoff(int64 delay_msec) override; | 22 void RecordCheckinDelayedDueToBackoff(int64_t delay_msec) override; |
| 20 void RecordCheckinSuccess() override; | 23 void RecordCheckinSuccess() override; |
| 21 void RecordCheckinFailure(const std::string& status, | 24 void RecordCheckinFailure(const std::string& status, |
| 22 bool will_retry) override; | 25 bool will_retry) override; |
| 23 void RecordConnectionInitiated(const std::string& host) override; | 26 void RecordConnectionInitiated(const std::string& host) override; |
| 24 void RecordConnectionDelayedDueToBackoff(int64 delay_msec) override; | 27 void RecordConnectionDelayedDueToBackoff(int64_t delay_msec) override; |
| 25 void RecordConnectionSuccess() override; | 28 void RecordConnectionSuccess() override; |
| 26 void RecordConnectionFailure(int network_error) override; | 29 void RecordConnectionFailure(int network_error) override; |
| 27 void RecordConnectionResetSignaled( | 30 void RecordConnectionResetSignaled( |
| 28 ConnectionFactory::ConnectionResetReason reason) override; | 31 ConnectionFactory::ConnectionResetReason reason) override; |
| 29 void RecordRegistrationSent(const std::string& app_id, | 32 void RecordRegistrationSent(const std::string& app_id, |
| 30 const std::string& source) override; | 33 const std::string& source) override; |
| 31 void RecordRegistrationResponse(const std::string& app_id, | 34 void RecordRegistrationResponse(const std::string& app_id, |
| 32 const std::string& source, | 35 const std::string& source, |
| 33 RegistrationRequest::Status status) override; | 36 RegistrationRequest::Status status) override; |
| 34 void RecordRegistrationRetryDelayed( | 37 void RecordRegistrationRetryDelayed(const std::string& app_id, |
| 35 const std::string& app_id, | 38 const std::string& source, |
| 36 const std::string& source, | 39 int64_t delay_msec, |
| 37 int64 delay_msec, | 40 int retries_left) override; |
| 38 int retries_left) override; | |
| 39 void RecordUnregistrationSent( | 41 void RecordUnregistrationSent( |
| 40 const std::string& app_id, | 42 const std::string& app_id, |
| 41 const std::string& source) override; | 43 const std::string& source) override; |
| 42 void RecordUnregistrationResponse( | 44 void RecordUnregistrationResponse( |
| 43 const std::string& app_id, | 45 const std::string& app_id, |
| 44 const std::string& source, | 46 const std::string& source, |
| 45 UnregistrationRequest::Status status) override; | 47 UnregistrationRequest::Status status) override; |
| 46 void RecordUnregistrationRetryDelayed(const std::string& app_id, | 48 void RecordUnregistrationRetryDelayed(const std::string& app_id, |
| 47 const std::string& source, | 49 const std::string& source, |
| 48 int64 delay_msec, | 50 int64_t delay_msec, |
| 49 int retries_left) override; | 51 int retries_left) override; |
| 50 void RecordDataMessageReceived(const std::string& app_id, | 52 void RecordDataMessageReceived(const std::string& app_id, |
| 51 const std::string& from, | 53 const std::string& from, |
| 52 int message_byte_size, | 54 int message_byte_size, |
| 53 bool to_registered_app, | 55 bool to_registered_app, |
| 54 ReceivedMessageType message_type) override; | 56 ReceivedMessageType message_type) override; |
| 55 void RecordDataSentToWire(const std::string& app_id, | 57 void RecordDataSentToWire(const std::string& app_id, |
| 56 const std::string& receiver_id, | 58 const std::string& receiver_id, |
| 57 const std::string& message_id, | 59 const std::string& message_id, |
| 58 int queued) override; | 60 int queued) override; |
| 59 void RecordNotifySendStatus(const std::string& app_id, | 61 void RecordNotifySendStatus(const std::string& app_id, |
| 60 const std::string& receiver_id, | 62 const std::string& receiver_id, |
| 61 const std::string& message_id, | 63 const std::string& message_id, |
| 62 MCSClient::MessageSendStatus status, | 64 MCSClient::MessageSendStatus status, |
| 63 int byte_size, | 65 int byte_size, |
| 64 int ttl) override; | 66 int ttl) override; |
| 65 void RecordIncomingSendError(const std::string& app_id, | 67 void RecordIncomingSendError(const std::string& app_id, |
| 66 const std::string& receiver_id, | 68 const std::string& receiver_id, |
| 67 const std::string& message_id) override; | 69 const std::string& message_id) override; |
| 68 | 70 |
| 69 private: | 71 private: |
| 70 DISALLOW_COPY_AND_ASSIGN(FakeGCMStatsRecorder); | 72 DISALLOW_COPY_AND_ASSIGN(FakeGCMStatsRecorder); |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace gcm | 75 } // namespace gcm |
| 74 | 76 |
| 75 #endif // GOOGLE_APIS_GCM_MONITORING_FAKE_GCM_STATS_RECODER_H_ | 77 #endif // GOOGLE_APIS_GCM_MONITORING_FAKE_GCM_STATS_RECODER_H_ |
| OLD | NEW |