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

Unified Diff: chrome/browser/notifications/message_center_notification_manager.cc

Issue 23902057: Stats collector for message center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Histograms.xml nit Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/message_center_notification_manager.cc
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc
index ccc912197bacc140bd416e8f24abe8fe757f5c8c..6ca049e4151972ff47ed627e1aae617ec24f0d69 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -23,7 +23,6 @@
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_service.h"
-#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "ui/gfx/image/image_skia.h"
@@ -53,7 +52,8 @@ MessageCenterNotificationManager::MessageCenterNotificationManager(
weak_factory_(this),
#endif
settings_provider_(settings_provider.Pass()),
- system_observer_(this) {
+ system_observer_(this),
+ stats_collector_(message_center) {
#if defined(OS_WIN)
first_run_pref_.Init(prefs::kMessageCenterShowedFirstRunBalloon, local_state);
#endif
@@ -232,21 +232,10 @@ void MessageCenterNotificationManager::OnNotificationRemoved(
void MessageCenterNotificationManager::OnCenterVisibilityChanged(
message_center::Visibility visibility) {
- switch (visibility) {
- case message_center::VISIBILITY_TRANSIENT:
#if defined(OS_WIN)
- CheckFirstRunTimer();
+ if (visibility == message_center::VISIBILITY_TRANSIENT)
+ CheckFirstRunTimer();
#endif
- break;
- case message_center::VISIBILITY_MESSAGE_CENTER:
- content::RecordAction(
- content::UserMetricsAction("Notifications.ShowMessageCenter"));
- break;
- case message_center::VISIBILITY_SETTINGS:
- content::RecordAction(
- content::UserMetricsAction("Notifications.ShowSettings"));
- break;
- }
}
void MessageCenterNotificationManager::OnNotificationUpdated(

Powered by Google App Engine
This is Rietveld 408576698