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

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

Issue 686133003: Reject push registrations when no sender Id has been provided. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 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 10 matching lines...) Expand all
21 // Registration failed because the maximum number of registratons has been 21 // Registration failed because the maximum number of registratons has been
22 // reached. 22 // reached.
23 PUSH_REGISTRATION_STATUS_LIMIT_REACHED = 3, 23 PUSH_REGISTRATION_STATUS_LIMIT_REACHED = 3,
24 24
25 // Registration failed because permission was denied. 25 // Registration failed because permission was denied.
26 PUSH_REGISTRATION_STATUS_PERMISSION_DENIED = 4, 26 PUSH_REGISTRATION_STATUS_PERMISSION_DENIED = 4,
27 27
28 // Registration failed in the push service implemented by the embedder. 28 // Registration failed in the push service implemented by the embedder.
29 PUSH_REGISTRATION_STATUS_SERVICE_ERROR = 5, 29 PUSH_REGISTRATION_STATUS_SERVICE_ERROR = 5,
30 30
31 // Registration failed because no sender id was provided by the page.
32 PUSH_REGISTRATION_STATUS_NO_SENDER_ID = 6,
33
31 // NOTE: Do not renumber these as that would confuse interpretation of 34 // NOTE: Do not renumber these as that would confuse interpretation of
32 // previously logged data. When making changes, also update the enum list 35 // previously logged data. When making changes, also update the enum list
33 // in tools/metrics/histograms/histograms.xml to keep it in sync, and 36 // in tools/metrics/histograms/histograms.xml to keep it in sync, and
34 // update PUSH_REGISTRATION_STATUS_LAST below. 37 // update PUSH_REGISTRATION_STATUS_LAST below.
35 38
36 // Used for IPC message range checks. 39 // Used for IPC message range checks.
37 PUSH_REGISTRATION_STATUS_LAST = PUSH_REGISTRATION_STATUS_SERVICE_ERROR 40 PUSH_REGISTRATION_STATUS_LAST = PUSH_REGISTRATION_STATUS_NO_SENDER_ID
38 }; 41 };
39 42
40 // Push message delivery success / error codes for internal use. 43 // Push message delivery success / error codes for internal use.
41 enum PushDeliveryStatus { 44 enum PushDeliveryStatus {
42 // The message was successfully delivered. 45 // The message was successfully delivered.
43 PUSH_DELIVERY_STATUS_SUCCESS, 46 PUSH_DELIVERY_STATUS_SUCCESS,
44 47
45 // The message could not be delivered because no service worker was found. 48 // The message could not be delivered because no service worker was found.
46 PUSH_DELIVERY_STATUS_NO_SERVICE_WORKER, 49 PUSH_DELIVERY_STATUS_NO_SERVICE_WORKER,
47 50
48 // The message could not be delivered because of a service worker error. 51 // The message could not be delivered because of a service worker error.
49 PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR, 52 PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR,
50 53
51 // When making changes, update PUSH_DELIVERY_STATUS_LAST below. 54 // When making changes, update PUSH_DELIVERY_STATUS_LAST below.
52 55
53 // Used for IPC message range checks. 56 // Used for IPC message range checks.
54 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR 57 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR
55 }; 58 };
56 59
57 const char* PushRegistrationStatusToString(PushRegistrationStatus status); 60 const char* PushRegistrationStatusToString(PushRegistrationStatus status);
58 61
59 } // namespace content 62 } // namespace content
60 63
61 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ 64 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_
OLDNEW
« no previous file with comments | « chrome/test/data/push_messaging/test.html ('k') | content/public/common/push_messaging_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698