OLD | NEW |
(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_ |
OLD | NEW |