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

Side by Side Diff: chrome/browser/notifications/sync_notifier/synced_notification_stats.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 - remove actions array and fix bug. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_STATS_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_STATS_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11
12 namespace notifier {
13
14 enum SyncedNotificationActionType {
15 SYNCED_NOTIFICATION_ACTION_UNKNOWN,
16 SYNCED_NOTIFICATION_ACTION_CLICK,
17 SYNCED_NOTIFICATION_ACTION_BUTTON_CLICK,
18 SYNCED_NOTIFICATION_ACTION_CLOSE_BY_USER,
19 SYNCED_NOTIFICATION_ACTION_CLOSE_BY_SYSTEM,
20 SYNCED_NOTIFICATION_ACTION_TOAST_TIMEOUT,
21 // NOTE: Add new action types only immediately above this line. Also,
22 // make sure the enum list in tools/histogram/histograms.xml is
23 // updated with any change in here.
24 SYNCED_NOTIFICATION_ACTION_COUNT
25 };
26
27 // Represents the aggregate stats for each notification.
28 class SyncedNotificationStats {
29 public:
30 // Default constructor for map.
31 SyncedNotificationStats();
32
33 explicit SyncedNotificationStats(const std::string& id);
34 virtual ~SyncedNotificationStats();
35
36 // Called when we get an action from the message center.
37 void CollectAction(SyncedNotificationActionType type);
38
39 private:
40 std::string id_;
41 };
42
43 } // namespace notifier
44
45 #endif // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_STATS_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698