chromium/chrome/browser/download/bubble/download_bubble_accessible_alerts_map.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/download/bubble/download_bubble_accessible_alerts_map.h"

#include <map>
#include <string>
#include <vector>

namespace {
// Only alert about a given download if it has been at least 3 minutes since
// the last alert for that download.
constexpr base::TimeDelta kAlertInterval =;
// Discard an alert if it has been more than 1 minute since it was added, even
// if it has never been announced. After this time interval, we consider it
// too stale to announce.
constexpr base::TimeDelta kAlertMaxStaleness =;
// Only track last-alerted times for 6 minutes. If no one attempts to
// re-announce an alert for a download within 6 minutes, we can garbage collect
// the last-alerted time and it will be as if that download was never announced.
constexpr base::TimeDelta kTrackAlertedTimesThreshold =;

ContentId;
}  // namespace

DownloadBubbleAccessibleAlertsMap::Alert::Alert(Urgency urgency,
                                                std::u16string_view alert_text)
    :{}

DownloadBubbleAccessibleAlertsMap::Alert::Alert(const Alert& other) = default;

DownloadBubbleAccessibleAlertsMap::Alert&
DownloadBubbleAccessibleAlertsMap::Alert::operator=(const Alert& other) =
    default;

DownloadBubbleAccessibleAlertsMap::Alert::Alert(Alert&& other) = default;

DownloadBubbleAccessibleAlertsMap::Alert&
DownloadBubbleAccessibleAlertsMap::Alert::operator=(Alert&& other) = default;

bool DownloadBubbleAccessibleAlertsMap::Alert::ShouldBeReplacedBy(
    const DownloadBubbleAccessibleAlertsMap::Alert& newer) const {}

bool DownloadBubbleAccessibleAlertsMap::Alert::IsStale() const {}

DownloadBubbleAccessibleAlertsMap::DownloadBubbleAccessibleAlertsMap() =
    default;

DownloadBubbleAccessibleAlertsMap::~DownloadBubbleAccessibleAlertsMap() =
    default;

bool DownloadBubbleAccessibleAlertsMap::MaybeAddAccessibleAlert(
    const offline_items_collection::ContentId& content_id,
    Alert alert) {}

std::vector<std::u16string>
DownloadBubbleAccessibleAlertsMap::TakeAlertsForAnnouncement() {}

void DownloadBubbleAccessibleAlertsMap::GarbageCollect() {}