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_GCM_STATS_RECORDER_H_ | 5 #ifndef GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ |
6 #define GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ | 6 #define GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 UnregistrationRequest::Status status) = 0; | 103 UnregistrationRequest::Status status) = 0; |
104 | 104 |
105 // Records that an unregistration retry has been requested and delayed due to | 105 // Records that an unregistration retry has been requested and delayed due to |
106 // backoff logic. | 106 // backoff logic. |
107 virtual void RecordUnregistrationRetryDelayed(const std::string& app_id, | 107 virtual void RecordUnregistrationRetryDelayed(const std::string& app_id, |
108 const std::string& source, | 108 const std::string& source, |
109 int64_t delay_msec, | 109 int64_t delay_msec, |
110 int retries_left) = 0; | 110 int retries_left) = 0; |
111 | 111 |
112 // Records that a data message has been received. If this message is not | 112 // Records that a data message has been received. If this message is not |
113 // sent to a registered app, to_registered_app shoudl be false. If it | 113 // sent to a registered app, to_registered_app should be false. If it |
114 // indicates that a message has been dropped on the server, is_message_dropped | 114 // indicates that one or more messages were dropped on the server, |
115 // should be true. | 115 // message_type should be DELETED_MESSAGES. |
116 virtual void RecordDataMessageReceived(const std::string& app_id, | 116 virtual void RecordDataMessageReceived(const std::string& app_id, |
117 const std::string& from, | 117 const std::string& from, |
118 int message_byte_size, | 118 int message_byte_size, |
119 bool to_registered_app, | 119 bool to_registered_app, |
120 ReceivedMessageType message_type) = 0; | 120 ReceivedMessageType message_type) = 0; |
121 | 121 |
122 // Records that an outgoing data message was sent over the wire. | 122 // Records that an outgoing data message was sent over the wire. |
123 virtual void RecordDataSentToWire(const std::string& app_id, | 123 virtual void RecordDataSentToWire(const std::string& app_id, |
124 const std::string& receiver_id, | 124 const std::string& receiver_id, |
125 const std::string& message_id, | 125 const std::string& message_id, |
126 int queued) = 0; | 126 int queued) = 0; |
127 // Records that the MCS client sent a 'send status' notification to callback. | 127 // Records that the MCS client sent a 'send status' notification to callback. |
128 virtual void RecordNotifySendStatus(const std::string& app_id, | 128 virtual void RecordNotifySendStatus(const std::string& app_id, |
129 const std::string& receiver_id, | 129 const std::string& receiver_id, |
130 const std::string& message_id, | 130 const std::string& message_id, |
131 MCSClient::MessageSendStatus status, | 131 MCSClient::MessageSendStatus status, |
132 int byte_size, | 132 int byte_size, |
133 int ttl) = 0; | 133 int ttl) = 0; |
134 // Records that a 'send error' message was received. | 134 // Records that a 'send error' message was received. |
135 virtual void RecordIncomingSendError(const std::string& app_id, | 135 virtual void RecordIncomingSendError(const std::string& app_id, |
136 const std::string& receiver_id, | 136 const std::string& receiver_id, |
137 const std::string& message_id) = 0; | 137 const std::string& message_id) = 0; |
138 }; | 138 }; |
139 | 139 |
140 } // namespace gcm | 140 } // namespace gcm |
141 | 141 |
142 #endif // GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ | 142 #endif // GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ |
OLD | NEW |