Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: google_apis/gcm/monitoring/gcm_stats_recorder.h

Issue 2558553002: GCM: Add Android UMA, and UMA for deleted/collapsed messages (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const std::string& source, 102 const std::string& source,
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 or dirty ping (indicating that one or more
113 // sent to a registered app, to_registered_app shoudl be false. If it 113 // messages were deleted on the server) has been received. If this message is
114 // indicates that a message has been dropped on the server, is_message_dropped 114 // not sent to a registered app, to_registered_app should be false.
115 // should be true. 115 // - For data messages |message_type| should be DATA_MESSAGE,
116 // |has_collapse_key| should be set and |deleted_count| is ignored.
117 // - For dirty pings |message_type| should be DELETED_MESSAGES,
118 // |has_collapse_key| is ignored, and |deleted_count| should be set, or 0 if
119 // unknown.
116 virtual void RecordDataMessageReceived(const std::string& app_id, 120 virtual void RecordDataMessageReceived(const std::string& app_id,
117 const std::string& from, 121 const std::string& from,
118 int message_byte_size, 122 int message_byte_size,
119 bool to_registered_app, 123 bool to_registered_app,
120 ReceivedMessageType message_type) = 0; 124 ReceivedMessageType message_type,
125 bool has_collapse_key,
126 int deleted_count) = 0;
121 127
122 // Records that an outgoing data message was sent over the wire. 128 // Records that an outgoing data message was sent over the wire.
123 virtual void RecordDataSentToWire(const std::string& app_id, 129 virtual void RecordDataSentToWire(const std::string& app_id,
124 const std::string& receiver_id, 130 const std::string& receiver_id,
125 const std::string& message_id, 131 const std::string& message_id,
126 int queued) = 0; 132 int queued) = 0;
127 // Records that the MCS client sent a 'send status' notification to callback. 133 // Records that the MCS client sent a 'send status' notification to callback.
128 virtual void RecordNotifySendStatus(const std::string& app_id, 134 virtual void RecordNotifySendStatus(const std::string& app_id,
129 const std::string& receiver_id, 135 const std::string& receiver_id,
130 const std::string& message_id, 136 const std::string& message_id,
131 MCSClient::MessageSendStatus status, 137 MCSClient::MessageSendStatus status,
132 int byte_size, 138 int byte_size,
133 int ttl) = 0; 139 int ttl) = 0;
134 // Records that a 'send error' message was received. 140 // Records that a 'send error' message was received.
135 virtual void RecordIncomingSendError(const std::string& app_id, 141 virtual void RecordIncomingSendError(const std::string& app_id,
136 const std::string& receiver_id, 142 const std::string& receiver_id,
137 const std::string& message_id) = 0; 143 const std::string& message_id) = 0;
138 }; 144 };
139 145
140 } // namespace gcm 146 } // namespace gcm
141 147
142 #endif // GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_ 148 #endif // GOOGLE_APIS_GCM_MONITORING_GCM_STATS_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698