OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANDROID_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_ANDROID_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_ANDROID_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_ANDROID_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void RecordUnregistrationSent(const std::string& app_id); | 52 void RecordUnregistrationSent(const std::string& app_id); |
53 | 53 |
54 // Records that the unregistration sent for |app_id| has received a response. | 54 // Records that the unregistration sent for |app_id| has received a response. |
55 // |success| indicates whether the unregistration was successful. | 55 // |success| indicates whether the unregistration was successful. |
56 void RecordUnregistrationResponse(const std::string& app_id, bool success); | 56 void RecordUnregistrationResponse(const std::string& app_id, bool success); |
57 | 57 |
58 // Records that a data message has been received for |app_id|. | 58 // Records that a data message has been received for |app_id|. |
59 void RecordDataMessageReceived(const std::string& app_id, | 59 void RecordDataMessageReceived(const std::string& app_id, |
60 int message_byte_size); | 60 int message_byte_size); |
61 | 61 |
62 // Records a message decryption failure caused by |reason| for |app_id|. | 62 // Records a message decryption failure caused by |result| for |app_id|. |
63 void RecordDecryptionFailure(const std::string& app_id, | 63 void RecordDecryptionFailure(const std::string& app_id, |
64 GCMEncryptionProvider::DecryptionFailure reason); | 64 GCMEncryptionProvider::DecryptionResult result); |
65 | 65 |
66 bool is_recording() const { return is_recording_; } | 66 bool is_recording() const { return is_recording_; } |
67 void set_is_recording(bool recording) { is_recording_ = recording; } | 67 void set_is_recording(bool recording) { is_recording_ = recording; } |
68 | 68 |
69 private: | 69 private: |
70 void RecordRegistration(const std::string& app_id, | 70 void RecordRegistration(const std::string& app_id, |
71 const std::string& event, | 71 const std::string& event, |
72 const std::string& details); | 72 const std::string& details); |
73 | 73 |
74 // Delegate made available by the container. May be a nullptr. | 74 // Delegate made available by the container. May be a nullptr. |
(...skipping 10 matching lines...) Expand all Loading... |
85 | 85 |
86 // Recorded message decryption failure activities. | 86 // Recorded message decryption failure activities. |
87 std::deque<DecryptionFailureActivity> decryption_failure_activities_; | 87 std::deque<DecryptionFailureActivity> decryption_failure_activities_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(GCMStatsRecorderAndroid); | 89 DISALLOW_COPY_AND_ASSIGN(GCMStatsRecorderAndroid); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace gcm | 92 } // namespace gcm |
93 | 93 |
94 #endif // COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_ANDROID_H_ | 94 #endif // COMPONENTS_GCM_DRIVER_GCM_STATS_RECORDER_ANDROID_H_ |
OLD | NEW |