Class StorageAdapter
Represents an adapter for the Storage domain to simplify the command interface.
public class StorageAdapter
- Inheritance
-
StorageAdapter
- Inherited Members
Constructors
StorageAdapter(IDevToolsSession)
Initializes a new instance of the StorageAdapter class.
public StorageAdapter(IDevToolsSession session)
Parameters
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
ClearCookies(ClearCookiesCommandSettings, CancellationToken, int?, bool)
Clears cookies.
public Task<ClearCookiesCommandResponse?> ClearCookies(ClearCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearCookiesCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearDataForOrigin(ClearDataForOriginCommandSettings, CancellationToken, int?, bool)
Clears storage for origin.
public Task<ClearDataForOriginCommandResponse?> ClearDataForOrigin(ClearDataForOriginCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearDataForOriginCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearDataForStorageKey(ClearDataForStorageKeyCommandSettings, CancellationToken, int?, bool)
Clears storage for storage key.
public Task<ClearDataForStorageKeyCommandResponse?> ClearDataForStorageKey(ClearDataForStorageKeyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearDataForStorageKeyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearSharedStorageEntries(ClearSharedStorageEntriesCommandSettings, CancellationToken, int?, bool)
Clears all entries for a given origin's shared storage.
public Task<ClearSharedStorageEntriesCommandResponse?> ClearSharedStorageEntries(ClearSharedStorageEntriesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearSharedStorageEntriesCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ClearTrustTokens(ClearTrustTokensCommandSettings, CancellationToken, int?, bool)
Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact.
public Task<ClearTrustTokensCommandResponse> ClearTrustTokens(ClearTrustTokensCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandClearTrustTokensCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
DeleteSharedStorageEntry(DeleteSharedStorageEntryCommandSettings, CancellationToken, int?, bool)
Deletes entry for key (if it exists) for a given origin's shared storage.
public Task<DeleteSharedStorageEntryCommandResponse?> DeleteSharedStorageEntry(DeleteSharedStorageEntryCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandDeleteSharedStorageEntryCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
DeleteStorageBucket(DeleteStorageBucketCommandSettings, CancellationToken, int?, bool)
Deletes the Storage Bucket with the given storage key and bucket name.
public Task<DeleteStorageBucketCommandResponse?> DeleteStorageBucket(DeleteStorageBucketCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandDeleteStorageBucketCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetCookies(GetCookiesCommandSettings, CancellationToken, int?, bool)
Returns all browser cookies.
public Task<GetCookiesCommandResponse> GetCookies(GetCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetCookiesCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetInterestGroupDetails(GetInterestGroupDetailsCommandSettings, CancellationToken, int?, bool)
Gets details for a named interest group.
public Task<GetInterestGroupDetailsCommandResponse> GetInterestGroupDetails(GetInterestGroupDetailsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetInterestGroupDetailsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetRelatedWebsiteSets(GetRelatedWebsiteSetsCommandSettings?, CancellationToken, int?, bool)
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.
public Task<GetRelatedWebsiteSetsCommandResponse> GetRelatedWebsiteSets(GetRelatedWebsiteSetsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetRelatedWebsiteSetsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetSharedStorageEntries(GetSharedStorageEntriesCommandSettings, CancellationToken, int?, bool)
Gets the entries in an given origin's shared storage.
public Task<GetSharedStorageEntriesCommandResponse> GetSharedStorageEntries(GetSharedStorageEntriesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetSharedStorageEntriesCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetSharedStorageMetadata(GetSharedStorageMetadataCommandSettings, CancellationToken, int?, bool)
Gets metadata for an origin's shared storage.
public Task<GetSharedStorageMetadataCommandResponse> GetSharedStorageMetadata(GetSharedStorageMetadataCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetSharedStorageMetadataCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetStorageKey(GetStorageKeyCommandSettings, CancellationToken, int?, bool)
Returns storage key for the given frame. If no frame ID is provided, the storage key of the target executing this command is returned.
public Task<GetStorageKeyCommandResponse> GetStorageKey(GetStorageKeyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetStorageKeyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetStorageKeyForFrame(GetStorageKeyForFrameCommandSettings, CancellationToken, int?, bool)
Returns a storage key given a frame id. Deprecated. Please use Storage.getStorageKey instead.
public Task<GetStorageKeyForFrameCommandResponse> GetStorageKeyForFrame(GetStorageKeyForFrameCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetStorageKeyForFrameCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetTrustTokens(GetTrustTokensCommandSettings?, CancellationToken, int?, bool)
Returns the number of stored Trust Tokens per issuer for the current browsing context.
public Task<GetTrustTokensCommandResponse> GetTrustTokens(GetTrustTokensCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetTrustTokensCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetUsageAndQuota(GetUsageAndQuotaCommandSettings, CancellationToken, int?, bool)
Returns usage and quota in bytes.
public Task<GetUsageAndQuotaCommandResponse> GetUsageAndQuota(GetUsageAndQuotaCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetUsageAndQuotaCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
OverrideQuotaForOrigin(OverrideQuotaForOriginCommandSettings, CancellationToken, int?, bool)
Override quota for the specified origin
public Task<OverrideQuotaForOriginCommandResponse?> OverrideQuotaForOrigin(OverrideQuotaForOriginCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandOverrideQuotaForOriginCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
ResetSharedStorageBudget(ResetSharedStorageBudgetCommandSettings, CancellationToken, int?, bool)
Resets the budget for ownerOrigin by clearing all budget withdrawals.
public Task<ResetSharedStorageBudgetCommandResponse?> ResetSharedStorageBudget(ResetSharedStorageBudgetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandResetSharedStorageBudgetCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
RunBounceTrackingMitigations(RunBounceTrackingMitigationsCommandSettings?, CancellationToken, int?, bool)
Deletes state for sites identified as potential bounce trackers, immediately.
public Task<RunBounceTrackingMitigationsCommandResponse> RunBounceTrackingMitigations(RunBounceTrackingMitigationsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandRunBounceTrackingMitigationsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetCookies(SetCookiesCommandSettings, CancellationToken, int?, bool)
Sets given cookies.
public Task<SetCookiesCommandResponse?> SetCookies(SetCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetCookiesCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetInterestGroupAuctionTracking(SetInterestGroupAuctionTrackingCommandSettings, CancellationToken, int?, bool)
Enables/Disables issuing of interestGroupAuctionEventOccurred and interestGroupAuctionNetworkRequestCreated.
public Task<SetInterestGroupAuctionTrackingCommandResponse?> SetInterestGroupAuctionTracking(SetInterestGroupAuctionTrackingCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetInterestGroupAuctionTrackingCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetInterestGroupTracking(SetInterestGroupTrackingCommandSettings, CancellationToken, int?, bool)
Enables/Disables issuing of interestGroupAccessed events.
public Task<SetInterestGroupTrackingCommandResponse?> SetInterestGroupTracking(SetInterestGroupTrackingCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetInterestGroupTrackingCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetProtectedAudienceKAnonymity(SetProtectedAudienceKAnonymityCommandSettings, CancellationToken, int?, bool)
setProtectedAudienceKAnonymity
public Task<SetProtectedAudienceKAnonymityCommandResponse?> SetProtectedAudienceKAnonymity(SetProtectedAudienceKAnonymityCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetProtectedAudienceKAnonymityCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetSharedStorageEntry(SetSharedStorageEntryCommandSettings, CancellationToken, int?, bool)
Sets entry with key and value for a given origin's shared storage.
public Task<SetSharedStorageEntryCommandResponse?> SetSharedStorageEntry(SetSharedStorageEntryCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetSharedStorageEntryCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetSharedStorageTracking(SetSharedStorageTrackingCommandSettings, CancellationToken, int?, bool)
Enables/disables issuing of sharedStorageAccessed events.
public Task<SetSharedStorageTrackingCommandResponse?> SetSharedStorageTracking(SetSharedStorageTrackingCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetSharedStorageTrackingCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetStorageBucketTracking(SetStorageBucketTrackingCommandSettings, CancellationToken, int?, bool)
Set tracking for a storage key's buckets.
public Task<SetStorageBucketTrackingCommandResponse?> SetStorageBucketTracking(SetStorageBucketTrackingCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetStorageBucketTrackingCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
TrackCacheStorageForOrigin(TrackCacheStorageForOriginCommandSettings, CancellationToken, int?, bool)
Registers origin to be notified when an update occurs to its cache storage list.
public Task<TrackCacheStorageForOriginCommandResponse?> TrackCacheStorageForOrigin(TrackCacheStorageForOriginCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandTrackCacheStorageForOriginCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
TrackCacheStorageForStorageKey(TrackCacheStorageForStorageKeyCommandSettings, CancellationToken, int?, bool)
Registers storage key to be notified when an update occurs to its cache storage list.
public Task<TrackCacheStorageForStorageKeyCommandResponse?> TrackCacheStorageForStorageKey(TrackCacheStorageForStorageKeyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandTrackCacheStorageForStorageKeyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
TrackIndexedDBForOrigin(TrackIndexedDBForOriginCommandSettings, CancellationToken, int?, bool)
Registers origin to be notified when an update occurs to its IndexedDB.
public Task<TrackIndexedDBForOriginCommandResponse?> TrackIndexedDBForOrigin(TrackIndexedDBForOriginCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandTrackIndexedDBForOriginCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
TrackIndexedDBForStorageKey(TrackIndexedDBForStorageKeyCommandSettings, CancellationToken, int?, bool)
Registers storage key to be notified when an update occurs to its IndexedDB.
public Task<TrackIndexedDBForStorageKeyCommandResponse?> TrackIndexedDBForStorageKey(TrackIndexedDBForStorageKeyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandTrackIndexedDBForStorageKeyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
UntrackCacheStorageForOrigin(UntrackCacheStorageForOriginCommandSettings, CancellationToken, int?, bool)
Unregisters origin from receiving notifications for cache storage.
public Task<UntrackCacheStorageForOriginCommandResponse?> UntrackCacheStorageForOrigin(UntrackCacheStorageForOriginCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandUntrackCacheStorageForOriginCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
UntrackCacheStorageForStorageKey(UntrackCacheStorageForStorageKeyCommandSettings, CancellationToken, int?, bool)
Unregisters storage key from receiving notifications for cache storage.
public Task<UntrackCacheStorageForStorageKeyCommandResponse?> UntrackCacheStorageForStorageKey(UntrackCacheStorageForStorageKeyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandUntrackCacheStorageForStorageKeyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
UntrackIndexedDBForOrigin(UntrackIndexedDBForOriginCommandSettings, CancellationToken, int?, bool)
Unregisters origin from receiving notifications for IndexedDB.
public Task<UntrackIndexedDBForOriginCommandResponse?> UntrackIndexedDBForOrigin(UntrackIndexedDBForOriginCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandUntrackIndexedDBForOriginCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
UntrackIndexedDBForStorageKey(UntrackIndexedDBForStorageKeyCommandSettings, CancellationToken, int?, bool)
Unregisters storage key from receiving notifications for IndexedDB.
public Task<UntrackIndexedDBForStorageKeyCommandResponse?> UntrackIndexedDBForStorageKey(UntrackIndexedDBForStorageKeyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandUntrackIndexedDBForStorageKeyCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Events
CacheStorageContentUpdated
A cache's contents have been modified.
public event EventHandler<CacheStorageContentUpdatedEventArgs>? CacheStorageContentUpdated
Event Type
CacheStorageListUpdated
A cache has been added/deleted.
public event EventHandler<CacheStorageListUpdatedEventArgs>? CacheStorageListUpdated
Event Type
IndexedDBContentUpdated
The origin's IndexedDB object store has been modified.
public event EventHandler<IndexedDBContentUpdatedEventArgs>? IndexedDBContentUpdated
Event Type
IndexedDBListUpdated
The origin's IndexedDB database list has been modified.
public event EventHandler<IndexedDBListUpdatedEventArgs>? IndexedDBListUpdated
Event Type
InterestGroupAccessed
One of the interest groups was accessed. Note that these events are global to all targets sharing an interest group store.
public event EventHandler<InterestGroupAccessedEventArgs>? InterestGroupAccessed
Event Type
InterestGroupAuctionEventOccurred
An auction involving interest groups is taking place. These events are target-specific.
public event EventHandler<InterestGroupAuctionEventOccurredEventArgs>? InterestGroupAuctionEventOccurred
Event Type
InterestGroupAuctionNetworkRequestCreated
Specifies which auctions a particular network fetch may be related to, and in what role. Note that it is not ordered with respect to Network.requestWillBeSent (but will happen before loadingFinished loadingFailed).
public event EventHandler<InterestGroupAuctionNetworkRequestCreatedEventArgs>? InterestGroupAuctionNetworkRequestCreated
Event Type
SharedStorageAccessed
Shared storage was accessed by the associated page. The following parameters are included in all events.
public event EventHandler<SharedStorageAccessedEventArgs>? SharedStorageAccessed
Event Type
SharedStorageWorkletOperationExecutionFinished
A shared storage run or selectURL operation finished its execution. The following parameters are included in all events.
public event EventHandler<SharedStorageWorkletOperationExecutionFinishedEventArgs>? SharedStorageWorkletOperationExecutionFinished
Event Type
StorageBucketCreatedOrUpdated
storageBucketCreatedOrUpdated
public event EventHandler<StorageBucketCreatedOrUpdatedEventArgs>? StorageBucketCreatedOrUpdated
Event Type
StorageBucketDeleted
storageBucketDeleted
public event EventHandler<StorageBucketDeletedEventArgs>? StorageBucketDeleted