Index: chrome/browser/notifications/sync_notifier/synced_notification_stats.cc |
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_stats.cc b/chrome/browser/notifications/sync_notifier/synced_notification_stats.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f4c46788acf72ae596dc686485e2a9f8a81b58b5 |
--- /dev/null |
+++ b/chrome/browser/notifications/sync_notifier/synced_notification_stats.cc |
@@ -0,0 +1,34 @@ |
+// 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. |
+ |
+#include "chrome/browser/notifications/sync_notifier/synced_notification_stats.h" |
+ |
+#include <string> |
+ |
+#include "base/metrics/histogram.h" |
+#include "content/public/browser/user_metrics.h" |
+ |
+namespace notifier { |
+ |
+SyncedNotificationStats::SyncedNotificationStats() {} |
+ |
+SyncedNotificationStats::SyncedNotificationStats( |
+ const std::string& id) : id_(id) { |
+ for (size_t i = 0; i < SYNCED_NOTIFICATION_ACTION_COUNT; ++i) |
+ actions_[i] = false; |
Alexei Svitkine (slow)
2013/10/16 13:51:01
Now that you're no longer using |actions_|, can yo
Pete Williamson
2013/10/17 05:26:41
Done.
|
+} |
+ |
+SyncedNotificationStats::~SyncedNotificationStats() {} |
+ |
+void SyncedNotificationStats::CollectAction( |
+ SyncedNotificationActionType type) { |
+ DCHECK(!id_.empty()); |
+ |
+ UMA_HISTOGRAM_ENUMERATION("SyncedNotifications.Actions", |
+ type, |
+ SYNCED_NOTIFICATION_ACTION_COUNT); |
+ actions_[type] = true; |
+} |
+ |
+} // namespace notifier |