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

Unified Diff: chrome/browser/notifications/sync_notifier/synced_notification_stats.cc

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 unused data 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
« no previous file with comments | « chrome/browser/notifications/sync_notifier/synced_notification_stats.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/notifications/sync_notifier/synced_notification_stats.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698