blob: 674542ab470b87c4c2ed9742156394acee2e5164 [file] [log] [blame]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module storage.mojom;
import "components/services/storage/privileged/mojom/indexed_db_bucket_types.mojom";
import "components/services/storage/public/mojom/buckets/bucket_id.mojom";
import "mojo/public/mojom/base/file_path.mojom";
// IndexedDB metadata for a single partition.
struct IdbPartitionMetadata {
mojo_base.mojom.FilePath partition_path;
array<IdbOriginMetadata> origin_list;
};
// This interface defines "chrome://indexeddb-internals" access to the IDB
// backend. Implemented by IndexedDBInternalsUI.
interface IdbInternalsHandler {
// Returns an array of 'IdbPartitionMetadata's or an error message. Each
// partition contains an array of 'IdbOriginMetadata's which contain a
// representation of an IDB database.
GetAllBucketsAcrossAllStorageKeys()
=> (string? error, array<IdbPartitionMetadata> partitions);
// Downloads the IDB in a zip file and closes it for the given bucket.
DownloadBucketData(BucketId bucketId)
=> (string? error, uint64 connection_count);
// Closes the IDB for the given bucket.
ForceClose(BucketId bucketId)
=> (string? error, uint64 connection_count);
};