| Index: chrome/browser/notifications/sync_notifier/synced_notification_stats.h
|
| diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_stats.h b/chrome/browser/notifications/sync_notifier/synced_notification_stats.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..55ec893bd0213484c543bcc5116b7e99362e401e
|
| --- /dev/null
|
| +++ b/chrome/browser/notifications/sync_notifier/synced_notification_stats.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_STATS_H_
|
| +#define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_STATS_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +
|
| +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
|
| +};
|
| +
|
| +// Represents the aggregate stats for each notification.
|
| +class SyncedNotificationStats {
|
| + public:
|
| + // Default constructor for map.
|
| + SyncedNotificationStats();
|
| +
|
| + explicit SyncedNotificationStats(const std::string& id);
|
| + virtual ~SyncedNotificationStats();
|
| +
|
| + // Called when we get an action from the message center.
|
| + void CollectAction(SyncedNotificationActionType type);
|
| +
|
| + private:
|
| + std::string id_;
|
| +};
|
| +
|
| +} // namespace notifier
|
| +
|
| +#endif // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_STATS_H_
|
|
|