OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/notifications/message_center_stats_collector.h" | 5 #include "chrome/browser/notifications/message_center_stats_collector.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram_macros.h" |
12 #include "content/public/browser/user_metrics.h" | 12 #include "content/public/browser/user_metrics.h" |
13 #include "ui/message_center/message_center.h" | 13 #include "ui/message_center/message_center.h" |
14 | 14 |
15 MessageCenterStatsCollector::NotificationStats::NotificationStats() {} | 15 MessageCenterStatsCollector::NotificationStats::NotificationStats() {} |
16 | 16 |
17 MessageCenterStatsCollector::NotificationStats::NotificationStats( | 17 MessageCenterStatsCollector::NotificationStats::NotificationStats( |
18 const std::string& id) : id_(id) { | 18 const std::string& id) : id_(id) { |
19 for (size_t i = 0; i < NOTIFICATION_ACTION_COUNT; i++) { | 19 for (size_t i = 0; i < NOTIFICATION_ACTION_COUNT; i++) { |
20 actions_[i] = false; | 20 actions_[i] = false; |
21 } | 21 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 void MessageCenterStatsCollector::OnQuietModeChanged(bool in_quiet_mode) { | 144 void MessageCenterStatsCollector::OnQuietModeChanged(bool in_quiet_mode) { |
145 if (in_quiet_mode) { | 145 if (in_quiet_mode) { |
146 content::RecordAction( | 146 content::RecordAction( |
147 base::UserMetricsAction("Notifications.Mute")); | 147 base::UserMetricsAction("Notifications.Mute")); |
148 } else { | 148 } else { |
149 content::RecordAction( | 149 content::RecordAction( |
150 base::UserMetricsAction("Notifications.Unmute")); | 150 base::UserMetricsAction("Notifications.Unmute")); |
151 } | 151 } |
152 } | 152 } |
OLD | NEW |