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

Unified Diff: chrome/browser/notifications/sync_notifier/chrome_notifier_delegate.h

Issue 26943002: Add UMA histogram data representing the Synced Notifications feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Notifications UMA - fix histograms.xml formatting Created 7 years, 2 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
Index: chrome/browser/notifications/sync_notifier/chrome_notifier_delegate.h
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_delegate.h b/chrome/browser/notifications/sync_notifier/chrome_notifier_delegate.h
index f0ea79bac5ba85226b3c5c8351005924fff61b02..4bf75fedf9f45c130c1946a40147b6c97065ba58 100644
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_delegate.h
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_delegate.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_DELEGATE_H_
#define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_DELEGATE_H_
+#include <map>
#include <string>
#include "chrome/browser/notifications/notification_delegate.h"
@@ -12,6 +13,19 @@
namespace notifier {
+enum SyncedNotificationActionType {
+ SYNCED_NOTIFICATION_ACTION_UNKNOWN,
+ SYNCED_NOTIFICATION_ACTION_CLICK,
+ SYNCED_NOTIFICATION_ACTION_BUTTON_CLICK,
+ SYNCED_NOTIFICATION_ACTION_CLOSE_BY_USER,
+ SYNCED_NOTIFICATION_ACTION_CLOSE_BY_SYSTEM,
+ SYNCED_NOTIFICATION_ACTION_TOAST_TIMEOUT,
+ // NOTE: Add new action types only immediately above this line. Also,
+ // make sure the enum list in tools/histogram/histograms.xml is
+ // updated with any change in here.
+ SYNCED_NOTIFICATION_ACTION_COUNT
+};
+
class ChromeNotifierService;
// ChromeNotifierDelegate is a NotificationDelegate which catches
@@ -35,6 +49,8 @@ class ChromeNotifierDelegate : public NotificationDelegate {
virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE;
+ void CollectAction(SyncedNotificationActionType type);
+
private:
virtual ~ChromeNotifierDelegate();
void NavigateToUrl(const GURL& destination) const;

Powered by Google App Engine
This is Rietveld 408576698