Interface IStorage
[Experimental("BIDICDP001")]
public interface IStorage
Properties
CacheStorageContentUpdated
A cache's contents have been modified.
IEventSource<CacheStorageContentUpdatedEventArgs> CacheStorageContentUpdated { get; }
Property Value
- IEventSource<CacheStorageContentUpdatedEventArgs>
Remarks
Event args (CacheStorageContentUpdatedEventArgs):
- Origin - Origin to update.
- StorageKey - Storage key to update.
- BucketId - Storage bucket to update.
- CacheName - Name of cache in origin.
CacheStorageListUpdated
A cache has been added/deleted.
IEventSource<CacheStorageListUpdatedEventArgs> CacheStorageListUpdated { get; }
Property Value
- IEventSource<CacheStorageListUpdatedEventArgs>
Remarks
Event args (CacheStorageListUpdatedEventArgs):
- Origin - Origin to update.
- StorageKey - Storage key to update.
- BucketId - Storage bucket to update.
IndexedDBContentUpdated
The origin's IndexedDB object store has been modified.
IEventSource<IndexedDBContentUpdatedEventArgs> IndexedDBContentUpdated { get; }
Property Value
- IEventSource<IndexedDBContentUpdatedEventArgs>
Remarks
Event args (IndexedDBContentUpdatedEventArgs):
- Origin - Origin to update.
- StorageKey - Storage key to update.
- BucketId - Storage bucket to update.
- DatabaseName - Database to update.
- ObjectStoreName - ObjectStore to update.
IndexedDBListUpdated
The origin's IndexedDB database list has been modified.
IEventSource<IndexedDBListUpdatedEventArgs> IndexedDBListUpdated { get; }
Property Value
- IEventSource<IndexedDBListUpdatedEventArgs>
Remarks
Event args (IndexedDBListUpdatedEventArgs):
- Origin - Origin to update.
- StorageKey - Storage key to update.
- BucketId - Storage bucket to update.
StorageBucketCreatedOrUpdated
IEventSource<StorageBucketCreatedOrUpdatedEventArgs> StorageBucketCreatedOrUpdated { get; }
Property Value
- IEventSource<StorageBucketCreatedOrUpdatedEventArgs>
Remarks
Event args (StorageBucketCreatedOrUpdatedEventArgs):
- BucketInfo
StorageBucketDeleted
IEventSource<StorageBucketDeletedEventArgs> StorageBucketDeleted { get; }
Property Value
- IEventSource<StorageBucketDeletedEventArgs>
Remarks
Event args (StorageBucketDeletedEventArgs):
- BucketId
Methods
ClearCookiesAsync(BrowserContextID?, string?, CancellationToken)
Clears cookies.
Task<ClearCookiesResult> ClearCookiesAsync(BrowserContextID? browserContextId = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
browserContextIdBrowserContextIDBrowser context to use when called on the browser endpoint.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ClearCookiesResult>
A task representing the asynchronous operation, containing a ClearCookiesResult.
ClearDataForOriginAsync(string, string, string?, CancellationToken)
Clears storage for origin.
Task<ClearDataForOriginResult> ClearDataForOriginAsync(string origin, string storageTypes, string? session = null, CancellationToken cancellationToken = default)
Parameters
originstringSecurity origin.
storageTypesstringComma separated list of StorageType to clear.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ClearDataForOriginResult>
A task representing the asynchronous operation, containing a ClearDataForOriginResult.
ClearDataForStorageKeyAsync(string, string, string?, CancellationToken)
Clears storage for storage key.
Task<ClearDataForStorageKeyResult> ClearDataForStorageKeyAsync(string storageKey, string storageTypes, string? session = null, CancellationToken cancellationToken = default)
Parameters
storageKeystringStorage key.
storageTypesstringComma separated list of StorageType to clear.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ClearDataForStorageKeyResult>
A task representing the asynchronous operation, containing a ClearDataForStorageKeyResult.
ClearTrustTokensAsync(string, string?, CancellationToken)
Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact.
Task<ClearTrustTokensResult> ClearTrustTokensAsync(string issuerOrigin, string? session = null, CancellationToken cancellationToken = default)
Parameters
issuerOriginstringsessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ClearTrustTokensResult>
A task representing the asynchronous operation, containing a ClearTrustTokensResult.
DeleteStorageBucketAsync(StorageBucket, string?, CancellationToken)
Deletes the Storage Bucket with the given storage key and bucket name.
Task<DeleteStorageBucketResult> DeleteStorageBucketAsync(StorageBucket bucket, string? session = null, CancellationToken cancellationToken = default)
Parameters
bucketStorageBucketsessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<DeleteStorageBucketResult>
A task representing the asynchronous operation, containing a DeleteStorageBucketResult.
GetCookiesAsync(BrowserContextID?, string?, CancellationToken)
Returns all browser cookies.
Task<GetCookiesResult> GetCookiesAsync(BrowserContextID? browserContextId = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
browserContextIdBrowserContextIDBrowser context to use when called on the browser endpoint.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetCookiesResult>
A task representing the asynchronous operation, containing a GetCookiesResult.
GetRelatedWebsiteSetsAsync(string?, CancellationToken)
Returns the effective Related Website Sets in use by this profile for the browser session. The effective Related Website Sets will not change during a browser session.
Task<GetRelatedWebsiteSetsResult> GetRelatedWebsiteSetsAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetRelatedWebsiteSetsResult>
A task representing the asynchronous operation, containing a GetRelatedWebsiteSetsResult.
GetStorageKeyAsync(FrameId?, string?, CancellationToken)
Returns storage key for the given frame. If no frame ID is provided, the storage key of the target executing this command is returned.
Task<GetStorageKeyResult> GetStorageKeyAsync(FrameId? frameId = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
frameIdFrameIdsessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetStorageKeyResult>
A task representing the asynchronous operation, containing a GetStorageKeyResult.
GetStorageKeyForFrameAsync(FrameId, string?, CancellationToken)
Returns a storage key given a frame id. Deprecated. Please use Storage.getStorageKey instead.
[Obsolete]
Task<GetStorageKeyForFrameResult> GetStorageKeyForFrameAsync(FrameId frameId, string? session = null, CancellationToken cancellationToken = default)
Parameters
frameIdFrameIdsessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetStorageKeyForFrameResult>
A task representing the asynchronous operation, containing a GetStorageKeyForFrameResult.
GetTrustTokensAsync(string?, CancellationToken)
Returns the number of stored Trust Tokens per issuer for the current browsing context.
Task<GetTrustTokensResult> GetTrustTokensAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetTrustTokensResult>
A task representing the asynchronous operation, containing a GetTrustTokensResult.
GetUsageAndQuotaAsync(string, string?, CancellationToken)
Returns usage and quota in bytes.
Task<GetUsageAndQuotaResult> GetUsageAndQuotaAsync(string origin, string? session = null, CancellationToken cancellationToken = default)
Parameters
originstringSecurity origin.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetUsageAndQuotaResult>
A task representing the asynchronous operation, containing a GetUsageAndQuotaResult.
OverrideQuotaForOriginAsync(string, double?, string?, CancellationToken)
Override quota for the specified origin
Task<OverrideQuotaForOriginResult> OverrideQuotaForOriginAsync(string origin, double? quotaSize = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
originstringSecurity origin.
quotaSizedouble?The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<OverrideQuotaForOriginResult>
A task representing the asynchronous operation, containing a OverrideQuotaForOriginResult.
RunBounceTrackingMitigationsAsync(string?, CancellationToken)
Deletes state for sites identified as potential bounce trackers, immediately.
Task<RunBounceTrackingMitigationsResult> RunBounceTrackingMitigationsAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<RunBounceTrackingMitigationsResult>
A task representing the asynchronous operation, containing a RunBounceTrackingMitigationsResult.
SetCookiesAsync(ImmutableArray<CookieParam>, BrowserContextID?, string?, CancellationToken)
Sets given cookies.
Task<SetCookiesResult> SetCookiesAsync(ImmutableArray<CookieParam> cookies, BrowserContextID? browserContextId = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
cookiesImmutableArray<CookieParam>Cookies to be set.
browserContextIdBrowserContextIDBrowser context to use when called on the browser endpoint.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SetCookiesResult>
A task representing the asynchronous operation, containing a SetCookiesResult.
SetStorageBucketTrackingAsync(string, bool, string?, CancellationToken)
Set tracking for a storage key's buckets.
Task<SetStorageBucketTrackingResult> SetStorageBucketTrackingAsync(string storageKey, bool enable, string? session = null, CancellationToken cancellationToken = default)
Parameters
storageKeystringenableboolsessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SetStorageBucketTrackingResult>
A task representing the asynchronous operation, containing a SetStorageBucketTrackingResult.
TrackCacheStorageForOriginAsync(string, string?, CancellationToken)
Registers origin to be notified when an update occurs to its cache storage list.
Task<TrackCacheStorageForOriginResult> TrackCacheStorageForOriginAsync(string origin, string? session = null, CancellationToken cancellationToken = default)
Parameters
originstringSecurity origin.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<TrackCacheStorageForOriginResult>
A task representing the asynchronous operation, containing a TrackCacheStorageForOriginResult.
TrackCacheStorageForStorageKeyAsync(string, string?, CancellationToken)
Registers storage key to be notified when an update occurs to its cache storage list.
Task<TrackCacheStorageForStorageKeyResult> TrackCacheStorageForStorageKeyAsync(string storageKey, string? session = null, CancellationToken cancellationToken = default)
Parameters
storageKeystringStorage key.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<TrackCacheStorageForStorageKeyResult>
A task representing the asynchronous operation, containing a TrackCacheStorageForStorageKeyResult.
TrackIndexedDBForOriginAsync(string, string?, CancellationToken)
Registers origin to be notified when an update occurs to its IndexedDB.
Task<TrackIndexedDBForOriginResult> TrackIndexedDBForOriginAsync(string origin, string? session = null, CancellationToken cancellationToken = default)
Parameters
originstringSecurity origin.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<TrackIndexedDBForOriginResult>
A task representing the asynchronous operation, containing a TrackIndexedDBForOriginResult.
TrackIndexedDBForStorageKeyAsync(string, string?, CancellationToken)
Registers storage key to be notified when an update occurs to its IndexedDB.
Task<TrackIndexedDBForStorageKeyResult> TrackIndexedDBForStorageKeyAsync(string storageKey, string? session = null, CancellationToken cancellationToken = default)
Parameters
storageKeystringStorage key.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<TrackIndexedDBForStorageKeyResult>
A task representing the asynchronous operation, containing a TrackIndexedDBForStorageKeyResult.
UntrackCacheStorageForOriginAsync(string, string?, CancellationToken)
Unregisters origin from receiving notifications for cache storage.
Task<UntrackCacheStorageForOriginResult> UntrackCacheStorageForOriginAsync(string origin, string? session = null, CancellationToken cancellationToken = default)
Parameters
originstringSecurity origin.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<UntrackCacheStorageForOriginResult>
A task representing the asynchronous operation, containing a UntrackCacheStorageForOriginResult.
UntrackCacheStorageForStorageKeyAsync(string, string?, CancellationToken)
Unregisters storage key from receiving notifications for cache storage.
Task<UntrackCacheStorageForStorageKeyResult> UntrackCacheStorageForStorageKeyAsync(string storageKey, string? session = null, CancellationToken cancellationToken = default)
Parameters
storageKeystringStorage key.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<UntrackCacheStorageForStorageKeyResult>
A task representing the asynchronous operation, containing a UntrackCacheStorageForStorageKeyResult.
UntrackIndexedDBForOriginAsync(string, string?, CancellationToken)
Unregisters origin from receiving notifications for IndexedDB.
Task<UntrackIndexedDBForOriginResult> UntrackIndexedDBForOriginAsync(string origin, string? session = null, CancellationToken cancellationToken = default)
Parameters
originstringSecurity origin.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<UntrackIndexedDBForOriginResult>
A task representing the asynchronous operation, containing a UntrackIndexedDBForOriginResult.
UntrackIndexedDBForStorageKeyAsync(string, string?, CancellationToken)
Unregisters storage key from receiving notifications for IndexedDB.
Task<UntrackIndexedDBForStorageKeyResult> UntrackIndexedDBForStorageKeyAsync(string storageKey, string? session = null, CancellationToken cancellationToken = default)
Parameters
storageKeystringStorage key.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<UntrackIndexedDBForStorageKeyResult>
A task representing the asynchronous operation, containing a UntrackIndexedDBForStorageKeyResult.