 Chromium Code Reviews
 Chromium Code Reviews| 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 CONTENT_PUBLIC_COMMON_PERSISTENT_NOTIFICATION_STATUS_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_PERSISTENT_NOTIFICATION_STATUS_H_ | 
| 6 #define CONTENT_PUBLIC_COMMON_PERSISTENT_NOTIFICATION_STATUS_H_ | 6 #define CONTENT_PUBLIC_COMMON_PERSISTENT_NOTIFICATION_STATUS_H_ | 
| 7 | 7 | 
| 8 namespace content { | 8 namespace content { | 
| 9 | 9 | 
| 10 // Delivery status for persistent notification clicks to a Service Worker. | 10 // Delivery status for persistent notification clicks to a Service Worker. | 
| 11 // NotificationStatus entries should not be reordered or removed. | |
| 
Peter Beverloo
2015/05/27 12:28:48
nit: Either "PersistentNotificationStatus entries
 
Deepak
2015/05/27 12:42:38
Done.
 | |
| 11 enum PersistentNotificationStatus { | 12 enum PersistentNotificationStatus { | 
| 12 // The notificationclick event has been delivered successfully. | 13 // The notificationclick event has been delivered successfully. | 
| 13 PERSISTENT_NOTIFICATION_STATUS_SUCCESS = 0, | 14 PERSISTENT_NOTIFICATION_STATUS_SUCCESS = 0, | 
| 14 | 15 | 
| 15 // The event could not be delivered because the Service Worker is unavailable. | 16 // The event could not be delivered because the Service Worker is unavailable. | 
| 16 PERSISTENT_NOTIFICATION_STATUS_NO_SERVICE_WORKER, | 17 PERSISTENT_NOTIFICATION_STATUS_NO_SERVICE_WORKER, | 
| 17 | 18 | 
| 18 // The event could not be delivered because of a Service Worker error. | 19 // The event could not be delivered because of a Service Worker error. | 
| 19 PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR, | 20 PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR, | 
| 20 | 21 | 
| 21 // The event has been delivered, but the developer extended the event with a | 22 // The event has been delivered, but the developer extended the event with a | 
| 22 // promise that has been rejected. | 23 // promise that has been rejected. | 
| 23 PERSISTENT_NOTIFICATION_STATUS_EVENT_WAITUNTIL_REJECTED, | 24 PERSISTENT_NOTIFICATION_STATUS_EVENT_WAITUNTIL_REJECTED, | 
| 24 | 25 | 
| 25 // The event could not be delivered because the data associated with the | 26 // The event could not be delivered because the data associated with the | 
| 26 // notification could not be read from the database. | 27 // notification could not be read from the database. | 
| 27 PERSISTENT_NOTIFICATION_STATUS_DATABASE_ERROR, | 28 PERSISTENT_NOTIFICATION_STATUS_DATABASE_ERROR, | 
| 29 | |
| 30 PERSISTENT_NOTIFICATION_STATUS_MAX | |
| 
Peter Beverloo
2015/05/27 12:28:48
nit: Please add a comment above this line saying:
 
Deepak
2015/05/27 12:42:38
Done.
 | |
| 28 }; | 31 }; | 
| 29 | 32 | 
| 30 } // content | 33 } // content | 
| 31 | 34 | 
| 32 #endif // CONTENT_PUBLIC_COMMON_PERSISTENT_NOTIFICATION_STATUS_H_ | 35 #endif // CONTENT_PUBLIC_COMMON_PERSISTENT_NOTIFICATION_STATUS_H_ | 
| OLD | NEW |