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

Side by Side Diff: content/public/common/push_messaging_status.h

Issue 2506393003: Add a timeout to push message processing. (Closed)
Patch Set: typo Created 4 years, 1 month 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 CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_
6 #define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ 6 #define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_
7 7
8 namespace content { 8 namespace content {
9 9
10 // Push registration success/error codes for internal use & reporting in UMA. 10 // Push registration success/error codes for internal use & reporting in UMA.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // The message could not be delivered because no service worker was found. 179 // The message could not be delivered because no service worker was found.
180 PUSH_DELIVERY_STATUS_NO_SERVICE_WORKER = 4, 180 PUSH_DELIVERY_STATUS_NO_SERVICE_WORKER = 4,
181 181
182 // The message could not be delivered because of a service worker error. 182 // The message could not be delivered because of a service worker error.
183 PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR = 5, 183 PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR = 5,
184 184
185 // The message was delivered, but the Service Worker passed a Promise to 185 // The message was delivered, but the Service Worker passed a Promise to
186 // event.waitUntil that got rejected. 186 // event.waitUntil that got rejected.
187 PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED = 6, 187 PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED = 6,
188 188
189 // The message was delivered, but the Service Worker timed out processing it.
190 PUSH_DELIVERY_STATUS_TIMEOUT = 7,
Peter Beverloo 2016/11/28 10:33:54 you need to update histograms.xml
harkness 2016/11/28 15:33:01 Thanks! I forgot that.
191
189 // NOTE: Do not renumber these as that would confuse interpretation of 192 // NOTE: Do not renumber these as that would confuse interpretation of
190 // previously logged data. When making changes, also update the enum list 193 // previously logged data. When making changes, also update the enum list
191 // in tools/metrics/histograms/histograms.xml to keep it in sync, and 194 // in tools/metrics/histograms/histograms.xml to keep it in sync, and
192 // update PUSH_DELIVERY_STATUS_LAST below. 195 // update PUSH_DELIVERY_STATUS_LAST below.
193 196
194 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED 197 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_TIMEOUT
195 }; 198 };
196 199
197 // Push message user visible tracking for reporting in UMA. Enum values can be 200 // Push message user visible tracking for reporting in UMA. Enum values can be
198 // added, but must never be renumbered or deleted and reused. 201 // added, but must never be renumbered or deleted and reused.
199 enum PushUserVisibleStatus { 202 enum PushUserVisibleStatus {
200 // A notification was required and one (or more) were shown. 203 // A notification was required and one (or more) were shown.
201 PUSH_USER_VISIBLE_STATUS_REQUIRED_AND_SHOWN = 0, 204 PUSH_USER_VISIBLE_STATUS_REQUIRED_AND_SHOWN = 0,
202 205
203 // A notification was not required, but one (or more) were shown anyway. 206 // A notification was not required, but one (or more) were shown anyway.
204 PUSH_USER_VISIBLE_STATUS_NOT_REQUIRED_BUT_SHOWN = 1, 207 PUSH_USER_VISIBLE_STATUS_NOT_REQUIRED_BUT_SHOWN = 1,
(...skipping 18 matching lines...) Expand all
223 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED 226 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED
224 }; 227 };
225 228
226 const char* PushRegistrationStatusToString(PushRegistrationStatus status); 229 const char* PushRegistrationStatusToString(PushRegistrationStatus status);
227 230
228 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); 231 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status);
229 232
230 } // namespace content 233 } // namespace content
231 234
232 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ 235 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698