#include "content/browser/quota/quota_change_dispatcher.h"
#include <map>
#include <utility>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/memory/ref_counted_delete_on_sequence.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "content/browser/quota/quota_manager_host.h"
#include "content/public/common/content_switches.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
namespace {
constexpr base::TimeDelta kDefaultQuotaChangeIntervalSeconds = …;
}
namespace content {
QuotaChangeDispatcher::DelayedStorageKeyListener::DelayedStorageKeyListener()
: … { … }
QuotaChangeDispatcher::DelayedStorageKeyListener::~DelayedStorageKeyListener() =
default;
QuotaChangeDispatcher::QuotaChangeDispatcher(
scoped_refptr<base::SequencedTaskRunner> io_thread)
: … { … }
QuotaChangeDispatcher::~QuotaChangeDispatcher() { … }
void QuotaChangeDispatcher::MaybeDispatchEvents() { … }
void QuotaChangeDispatcher::DispatchEventsForStorageKey(
const blink::StorageKey& storage_key) { … }
void QuotaChangeDispatcher::AddChangeListener(
const blink::StorageKey& storage_key,
mojo::PendingRemote<blink::mojom::QuotaChangeListener> mojo_listener) { … }
void QuotaChangeDispatcher::OnRemoteDisconnect(
const blink::StorageKey& storage_key,
mojo::RemoteSetElementId id) { … }
const base::TimeDelta QuotaChangeDispatcher::GetQuotaChangeEventInterval() { … }
}