blob: 6dade106325676a2e5f9b00465b6b1778f572255 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/notifications/metrics/notification_metrics_logger.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "chrome/browser/notifications/metrics/notification_metrics_logger_factory.h"
#include "content/public/common/persistent_notification_status.h"
NotificationMetricsLogger::NotificationMetricsLogger() = default;
NotificationMetricsLogger::~NotificationMetricsLogger() = default;
void NotificationMetricsLogger::LogPersistentNotificationClosedByUser() {
base::RecordAction(
base::UserMetricsAction("Notifications.Persistent.ClosedByUser"));
}
void NotificationMetricsLogger::
LogPersistentNotificationClosedProgrammatically() {
base::RecordAction(base::UserMetricsAction(
"Notifications.Persistent.ClosedProgrammatically"));
}
void NotificationMetricsLogger::LogPersistentNotificationActionButtonClick() {
base::RecordAction(
base::UserMetricsAction("Notifications.Persistent.ClickedActionButton"));
}
void NotificationMetricsLogger::LogPersistentNotificationClick() {
base::RecordAction(
base::UserMetricsAction("Notifications.Persistent.Clicked"));
}
void NotificationMetricsLogger::
LogPersistentNotificationClickWithoutPermission() {
base::RecordAction(base::UserMetricsAction(
"Notifications.Persistent.ClickedWithoutPermission"));
}
void NotificationMetricsLogger::LogPersistentNotificationShown() {
base::RecordAction(base::UserMetricsAction("Notifications.Persistent.Shown"));
}