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

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

Issue 926583002: Push API: UMA logs of whether SWs show notifications when required (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ifdef_brackets
Patch Set: Comment tweaks Created 5 years, 10 months 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // The message was delivered, but the Service Worker passed a Promise to 101 // The message was delivered, but the Service Worker passed a Promise to
102 // event.waitUntil that got rejected. 102 // event.waitUntil that got rejected.
103 PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED, 103 PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED,
104 104
105 // When making changes, update PUSH_DELIVERY_STATUS_LAST below. 105 // When making changes, update PUSH_DELIVERY_STATUS_LAST below.
106 106
107 // Used for IPC message range checks. 107 // Used for IPC message range checks.
108 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED 108 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED
109 }; 109 };
110 110
111 // Push message user visible tracking for reporting in UMA.
112 enum PushUserVisibleStatus {
no sievers 2015/02/17 20:26:56 Hmm ok, it was already like this, but http://www.
113 // A notification was required and one (or more) were shown.
114 PUSH_USER_VISIBLE_STATUS_REQUIRED_AND_SHOWN = 0,
115
116 // A notification was not required, but one (or more) were shown anyway.
117 PUSH_USER_VISIBLE_STATUS_NOT_REQUIRED_BUT_SHOWN = 1,
118
119 // A notification was not required and none were shown.
120 PUSH_USER_VISIBLE_STATUS_NOT_REQUIRED_AND_NOT_SHOWN = 2,
121
122 // A notification was required, but none were shown. Fortunately, the site has
123 // been well behaved recently so it was glossed over.
124 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_USED_GRACE = 3,
125
126 // A notification was required, but none were shown. Unfortunately, the site
127 // has run out of grace, so we had to show the user a generic notification.
128 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED = 4,
129
130 // NOTE: Do not renumber these as that would confuse interpretation of
131 // previously logged data. When making changes, also update the enum list
132 // in tools/metrics/histograms/histograms.xml to keep it in sync, and
133 // update PUSH_USER_VISIBLE_STATUS_LAST below.
134
135 // Used for IPC message range checks.
136 PUSH_USER_VISIBLE_STATUS_LAST =
137 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED
138 };
139
111 const char* PushRegistrationStatusToString(PushRegistrationStatus status); 140 const char* PushRegistrationStatusToString(PushRegistrationStatus status);
112 141
113 } // namespace content 142 } // namespace content
114 143
115 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ 144 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_
OLDNEW
« no previous file with comments | « chrome/browser/services/gcm/push_messaging_service_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698