#include "components/permissions/notifications_engagement_service.h"
#include "components/permissions/permissions_client.h"
#include "url/gurl.h"
namespace permissions {
namespace {
constexpr char kEngagementKey[] = …;
constexpr char kDisplayedKey[] = …;
constexpr base::TimeDelta kMaxAge = …;
void EraseStaleEntries(base::Value::Dict& engagement) { … }
}
NotificationsEngagementService::NotificationsEngagementService(
content::BrowserContext* context,
PrefService* pref_service)
: … { … }
void NotificationsEngagementService::Shutdown() { … }
void NotificationsEngagementService::RecordNotificationDisplayed(
const GURL& url) { … }
void NotificationsEngagementService::RecordNotificationDisplayed(
const GURL& url,
int display_count) { … }
void NotificationsEngagementService::RecordNotificationInteraction(
const GURL& url) { … }
void NotificationsEngagementService::IncrementCounts(const GURL& url,
int display_count_delta,
int click_count_delta) { … }
std::string NotificationsEngagementService::GetBucketLabel(base::Time date) { … }
std::optional<base::Time>
NotificationsEngagementService::ParsePeriodBeginFromBucketLabel(
const std::string& label) { … }
}