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 #include "chrome/browser/notifications/sync_notifier/synced_notification_stats.h " | |
6 | |
7 #include <string> | |
8 | |
9 #include "base/metrics/histogram.h" | |
10 #include "content/public/browser/user_metrics.h" | |
11 | |
12 namespace notifier { | |
13 | |
14 SyncedNotificationStats::SyncedNotificationStats() {} | |
15 | |
16 SyncedNotificationStats::SyncedNotificationStats( | |
17 const std::string& id) : id_(id) { | |
18 for (size_t i = 0; i < SYNCED_NOTIFICATION_ACTION_COUNT; ++i) | |
19 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.
| |
20 } | |
21 | |
22 SyncedNotificationStats::~SyncedNotificationStats() {} | |
23 | |
24 void SyncedNotificationStats::CollectAction( | |
25 SyncedNotificationActionType type) { | |
26 DCHECK(!id_.empty()); | |
27 | |
28 UMA_HISTOGRAM_ENUMERATION("SyncedNotifications.Actions", | |
29 type, | |
30 SYNCED_NOTIFICATION_ACTION_COUNT); | |
31 actions_[type] = true; | |
32 } | |
33 | |
34 } // namespace notifier | |
OLD | NEW |