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

Side by Side Diff: chrome/browser/notifications/message_center_stats_collector.cc

Issue 2807623002: Fix the settings button and UMA metrics for the message center (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698