| 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_STATS_RECORDER_IMPL_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_IMPL_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_IMPL_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 public: | 32 public: |
| 33 GCMStatsRecorderImpl(); | 33 GCMStatsRecorderImpl(); |
| 34 ~GCMStatsRecorderImpl() override; | 34 ~GCMStatsRecorderImpl() override; |
| 35 | 35 |
| 36 // Set a delegate to receive callback from the recorder. | 36 // Set a delegate to receive callback from the recorder. |
| 37 void SetDelegate(Delegate* delegate); | 37 void SetDelegate(Delegate* delegate); |
| 38 | 38 |
| 39 // Clear all recorded activities. | 39 // Clear all recorded activities. |
| 40 void Clear(); | 40 void Clear(); |
| 41 | 41 |
| 42 // Records a message decryption failure caused by |reason| for |app_id|. | 42 // Records a message decryption failure caused by |result| for |app_id|. |
| 43 void RecordDecryptionFailure(const std::string& app_id, | 43 void RecordDecryptionFailure(const std::string& app_id, |
| 44 GCMEncryptionProvider::DecryptionFailure reason); | 44 GCMEncryptionProvider::DecryptionResult result); |
| 45 | 45 |
| 46 // GCMStatsRecorder implementation: | 46 // GCMStatsRecorder implementation: |
| 47 void RecordCheckinInitiated(uint64_t android_id) override; | 47 void RecordCheckinInitiated(uint64_t android_id) override; |
| 48 void RecordCheckinDelayedDueToBackoff(int64_t delay_msec) override; | 48 void RecordCheckinDelayedDueToBackoff(int64_t delay_msec) override; |
| 49 void RecordCheckinSuccess() override; | 49 void RecordCheckinSuccess() override; |
| 50 void RecordCheckinFailure(const std::string& status, | 50 void RecordCheckinFailure(const std::string& status, |
| 51 bool will_retry) override; | 51 bool will_retry) override; |
| 52 void RecordConnectionInitiated(const std::string& host) override; | 52 void RecordConnectionInitiated(const std::string& host) override; |
| 53 void RecordConnectionDelayedDueToBackoff(int64_t delay_msec) override; | 53 void RecordConnectionDelayedDueToBackoff(int64_t delay_msec) override; |
| 54 void RecordConnectionSuccess() override; | 54 void RecordConnectionSuccess() override; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 base::TimeTicks last_received_data_message_burst_start_time_; | 163 base::TimeTicks last_received_data_message_burst_start_time_; |
| 164 base::TimeTicks last_received_data_message_time_within_burst_; | 164 base::TimeTicks last_received_data_message_time_within_burst_; |
| 165 int64_t received_data_message_burst_size_; | 165 int64_t received_data_message_burst_size_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(GCMStatsRecorderImpl); | 167 DISALLOW_COPY_AND_ASSIGN(GCMStatsRecorderImpl); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 } // namespace gcm | 170 } // namespace gcm |
| 171 | 171 |
| 172 #endif // COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_IMPL_H_ | 172 #endif // COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_IMPL_H_ |
| OLD | NEW |