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

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

Issue 264123002: Google Now Message Center Stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename Created 6 years, 7 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 | Annotate | Revision Log
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 <string> 7 #include <string>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "content/public/browser/user_metrics.h" 10 #include "content/public/browser/user_metrics.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 int button_index) { 101 int button_index) {
102 StatsCollection::iterator iter = stats_.find(notification_id); 102 StatsCollection::iterator iter = stats_.find(notification_id);
103 if (iter == stats_.end()) 103 if (iter == stats_.end())
104 return; 104 return;
105 NotificationStats& notification_stat = iter->second; 105 NotificationStats& notification_stat = iter->second;
106 106
107 notification_stat.CollectAction(NOTIFICATION_ACTION_BUTTON_CLICK); 107 notification_stat.CollectAction(NOTIFICATION_ACTION_BUTTON_CLICK);
108 } 108 }
109 109
110 void MessageCenterStatsCollector::OnNotificationDisplayed( 110 void MessageCenterStatsCollector::OnNotificationDisplayed(
111 const std::string& notification_id) { 111 const std::string& notification_id,
112 const message_center::DisplaySource source) {
112 StatsCollection::iterator iter = stats_.find(notification_id); 113 StatsCollection::iterator iter = stats_.find(notification_id);
113 if (iter == stats_.end()) 114 if (iter == stats_.end())
114 return; 115 return;
115 NotificationStats& notification_stat = iter->second; 116 NotificationStats& notification_stat = iter->second;
116 117
117 notification_stat.CollectAction(NOTIFICATION_ACTION_DISPLAY); 118 notification_stat.CollectAction(NOTIFICATION_ACTION_DISPLAY);
118 } 119 }
119 120
120 void MessageCenterStatsCollector::OnCenterVisibilityChanged( 121 void MessageCenterStatsCollector::OnCenterVisibilityChanged(
121 message_center::Visibility visibility) { 122 message_center::Visibility visibility) {
(...skipping 14 matching lines...) Expand all
136 void MessageCenterStatsCollector::OnQuietModeChanged(bool in_quiet_mode) { 137 void MessageCenterStatsCollector::OnQuietModeChanged(bool in_quiet_mode) {
137 if (in_quiet_mode) { 138 if (in_quiet_mode) {
138 content::RecordAction( 139 content::RecordAction(
139 base::UserMetricsAction("Notifications.Mute")); 140 base::UserMetricsAction("Notifications.Mute"));
140 } else { 141 } else {
141 content::RecordAction( 142 content::RecordAction(
142 base::UserMetricsAction("Notifications.Unmute")); 143 base::UserMetricsAction("Notifications.Unmute"));
143 } 144 }
144 } 145 }
145 146
OLDNEW
« no previous file with comments | « chrome/browser/notifications/message_center_stats_collector.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698