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

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

Issue 2436393002: Disallow repeated PushManager.subscribes with different sender ids (Closed)
Patch Set: Make error message more informative 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // but we tell JS that permission was denied to not reveal incognito. 50 // but we tell JS that permission was denied to not reveal incognito.
51 PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED = 10, 51 PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED = 10,
52 52
53 // Registration failed because the public key could not be retrieved. 53 // Registration failed because the public key could not be retrieved.
54 PUSH_REGISTRATION_STATUS_PUBLIC_KEY_UNAVAILABLE = 11, 54 PUSH_REGISTRATION_STATUS_PUBLIC_KEY_UNAVAILABLE = 11,
55 55
56 // Registration failed because the manifest could not be retrieved or was 56 // Registration failed because the manifest could not be retrieved or was
57 // empty. 57 // empty.
58 PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING = 12, 58 PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING = 12,
59 59
60 // Registration failed because a subscription with a different sender id
61 // already exists.
62 PUSH_REGISTRATION_STATUS_SENDER_ID_MISMATCH = 13,
63
60 // NOTE: Do not renumber these as that would confuse interpretation of 64 // NOTE: Do not renumber these as that would confuse interpretation of
61 // previously logged data. When making changes, also update the enum list 65 // previously logged data. When making changes, also update the enum list
62 // in tools/metrics/histograms/histograms.xml to keep it in sync, and 66 // in tools/metrics/histograms/histograms.xml to keep it in sync, and
63 // update PUSH_REGISTRATION_STATUS_LAST below. 67 // update PUSH_REGISTRATION_STATUS_LAST below.
64 68
65 PUSH_REGISTRATION_STATUS_LAST = 69 PUSH_REGISTRATION_STATUS_LAST = PUSH_REGISTRATION_STATUS_SENDER_ID_MISMATCH
66 PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING
67 }; 70 };
68 71
69 // Push unregistration reason for reporting in UMA. Enum values can be added, 72 // Push unregistration reason for reporting in UMA. Enum values can be added,
70 // but must never be renumbered or deleted and reused. 73 // but must never be renumbered or deleted and reused.
71 enum PushUnregistrationReason { 74 enum PushUnregistrationReason {
72 // Should never happen. 75 // Should never happen.
73 PUSH_UNREGISTRATION_REASON_UNKNOWN = 0, 76 PUSH_UNREGISTRATION_REASON_UNKNOWN = 0,
74 77
75 // Unregistering because the website called the unsubscribe API. 78 // Unregistering because the website called the unsubscribe API.
76 PUSH_UNREGISTRATION_REASON_JAVASCRIPT_API = 1, 79 PUSH_UNREGISTRATION_REASON_JAVASCRIPT_API = 1,
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
« no previous file with comments | « content/child/push_messaging/push_provider.cc ('k') | content/public/common/push_messaging_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698