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

Unified Diff: chrome/browser/notifications/platform_notification_service_impl.cc

Issue 1155483002: Adding UMA for persistent notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/platform_notification_service_impl.cc
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 56908d85b8691880bd8035162cc15555a6b986cf..57938091de591b1d1535686a34c989b2827d7e89 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/notifications/platform_notification_service_impl.h"
+#include "base/metrics/histogram_macros.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
@@ -52,15 +53,17 @@ namespace {
// Callback to provide when deleting the data associated with persistent Web
// Notifications from the notification database.
void OnPersistentNotificationDataDeleted(bool success) {
- // TODO(peter): Record UMA for notification deletion requests created by the
- // PlatformNotificationService.
+ UMA_HISTOGRAM_BOOLEAN(
+ "PlatformNotificationService.PersistentNotificationDataDeleted", success);
Peter Beverloo 2015/05/22 13:40:34 These need to be added to tools/metrics/histograms
Deepak 2015/05/22 14:09:29 Done.
}
// Persistent notifications fired through the delegate do not care about the
// lifetime of the Service Worker responsible for executing the event.
void OnEventDispatchComplete(content::PersistentNotificationStatus status) {
- // TODO(peter): Record UMA statistics about the result status of running
- // events for persistent Web Notifications.
+ UMA_HISTOGRAM_BOOLEAN(
+ "PlatformNotificationService.PersistentWebNotificationComplete",
Peter Beverloo 2015/05/22 13:40:34 Why wouldn't we record all states of |status| here
Peter Beverloo 2015/05/22 13:40:35 naming nit: PNS.PersistentWebNotificationClickResu
Deepak 2015/05/22 14:09:29 Done.
+ content::PersistentNotificationStatus::
+ PERSISTENT_NOTIFICATION_STATUS_SUCCESS == status);
Peter Beverloo 2015/05/22 13:40:35 nit: indentation.
Deepak 2015/05/22 14:09:29 ok, I will run 'git cl format' for checking indent
}
void CancelNotification(const std::string& id, ProfileID profile_id) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698