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 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 const std::string& notification_id, | 102 const std::string& notification_id, |
103 int button_index) { | 103 int button_index) { |
104 StatsCollection::iterator iter = stats_.find(notification_id); | 104 StatsCollection::iterator iter = stats_.find(notification_id); |
105 if (iter == stats_.end()) | 105 if (iter == stats_.end()) |
106 return; | 106 return; |
107 NotificationStats& notification_stat = iter->second; | 107 NotificationStats& notification_stat = iter->second; |
108 | 108 |
109 notification_stat.CollectAction(NOTIFICATION_ACTION_BUTTON_CLICK); | 109 notification_stat.CollectAction(NOTIFICATION_ACTION_BUTTON_CLICK); |
110 } | 110 } |
111 | 111 |
112 void MessageCenterStatsCollector::OnNotificationSettingsClicked() { | 112 void MessageCenterStatsCollector::OnNotificationSettingsClicked(bool handled) { |
113 base::RecordAction(base::UserMetricsAction("Notifications.ShowSiteSettings")); | 113 base::RecordAction(base::UserMetricsAction("Notifications.ShowSiteSettings")); |
114 } | 114 } |
115 | 115 |
116 void MessageCenterStatsCollector::OnNotificationDisplayed( | 116 void MessageCenterStatsCollector::OnNotificationDisplayed( |
117 const std::string& notification_id, | 117 const std::string& notification_id, |
118 const message_center::DisplaySource source) { | 118 const message_center::DisplaySource source) { |
119 StatsCollection::iterator iter = stats_.find(notification_id); | 119 StatsCollection::iterator iter = stats_.find(notification_id); |
120 if (iter == stats_.end()) | 120 if (iter == stats_.end()) |
121 return; | 121 return; |
122 NotificationStats& notification_stat = iter->second; | 122 NotificationStats& notification_stat = iter->second; |
(...skipping 16 matching lines...) Expand all Loading... |
139 } | 139 } |
140 } | 140 } |
141 | 141 |
142 void MessageCenterStatsCollector::OnQuietModeChanged(bool in_quiet_mode) { | 142 void MessageCenterStatsCollector::OnQuietModeChanged(bool in_quiet_mode) { |
143 if (in_quiet_mode) { | 143 if (in_quiet_mode) { |
144 base::RecordAction(base::UserMetricsAction("Notifications.Mute")); | 144 base::RecordAction(base::UserMetricsAction("Notifications.Mute")); |
145 } else { | 145 } else { |
146 base::RecordAction(base::UserMetricsAction("Notifications.Unmute")); | 146 base::RecordAction(base::UserMetricsAction("Notifications.Unmute")); |
147 } | 147 } |
148 } | 148 } |
OLD | NEW |