#include "content/browser/devtools/protocol/storage.h"
#include "content/browser/devtools/protocol/protocol.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"
#include "third_party/inspector_protocol/crdtp/find_by_first.h"
#include "third_party/inspector_protocol/crdtp/span.h"
namespace content {
namespace protocol {
namespace Storage {
DeserializerState;
ProtocolTypeTraits;
const char Metainfo::domainName[] = …;
const char Metainfo::commandPrefix[] = …;
const char Metainfo::version[] = …;
namespace StorageTypeEnum {
const char Appcache[] = …;
const char Cookies[] = …;
const char File_systems[] = …;
const char Indexeddb[] = …;
const char Local_storage[] = …;
const char Shader_cache[] = …;
const char Websql[] = …;
const char Service_workers[] = …;
const char Cache_storage[] = …;
const char Interest_groups[] = …;
const char Shared_storage[] = …;
const char Storage_buckets[] = …;
const char All[] = …;
const char Other[] = …;
}
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
namespace InterestGroupAccessTypeEnum {
const char Join[] = …;
const char Leave[] = …;
const char Update[] = …;
const char Loaded[] = …;
const char Bid[] = …;
const char Win[] = …;
const char AdditionalBid[] = …;
const char AdditionalBidWin[] = …;
const char TopLevelBid[] = …;
const char TopLevelAdditionalBid[] = …;
const char Clear[] = …;
}
namespace InterestGroupAuctionEventTypeEnum {
const char Started[] = …;
const char ConfigResolved[] = …;
}
namespace InterestGroupAuctionFetchTypeEnum {
const char BidderJs[] = …;
const char BidderWasm[] = …;
const char SellerJs[] = …;
const char BidderTrustedSignals[] = …;
const char SellerTrustedSignals[] = …;
}
namespace SharedStorageAccessTypeEnum {
const char DocumentAddModule[] = …;
const char DocumentSelectURL[] = …;
const char DocumentRun[] = …;
const char DocumentSet[] = …;
const char DocumentAppend[] = …;
const char DocumentDelete[] = …;
const char DocumentClear[] = …;
const char DocumentGet[] = …;
const char WorkletSet[] = …;
const char WorkletAppend[] = …;
const char WorkletDelete[] = …;
const char WorkletClear[] = …;
const char WorkletGet[] = …;
const char WorkletKeys[] = …;
const char WorkletEntries[] = …;
const char WorkletLength[] = …;
const char WorkletRemainingBudget[] = …;
const char HeaderSet[] = …;
const char HeaderAppend[] = …;
const char HeaderDelete[] = …;
const char HeaderClear[] = …;
}
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
namespace StorageBucketsDurabilityEnum {
const char Relaxed[] = …;
const char Strict[] = …;
}
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
namespace AttributionReportingSourceTypeEnum {
const char Navigation[] = …;
const char Event[] = …;
}
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
namespace AttributionReportingTriggerDataMatchingEnum {
const char Exact[] = …;
const char Modulus[] = …;
}
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
namespace AttributionReportingSourceRegistrationResultEnum {
const char Success[] = …;
const char InternalError[] = …;
const char InsufficientSourceCapacity[] = …;
const char InsufficientUniqueDestinationCapacity[] = …;
const char ExcessiveReportingOrigins[] = …;
const char ProhibitedByBrowserPolicy[] = …;
const char SuccessNoised[] = …;
const char DestinationReportingLimitReached[] = …;
const char DestinationGlobalLimitReached[] = …;
const char DestinationBothLimitsReached[] = …;
const char ReportingOriginsPerSiteLimitReached[] = …;
const char ExceedsMaxChannelCapacity[] = …;
const char ExceedsMaxScopesChannelCapacity[] = …;
const char ExceedsMaxTriggerStateCardinality[] = …;
const char ExceedsMaxEventStatesLimit[] = …;
const char DestinationPerDayReportingLimitReached[] = …;
}
namespace AttributionReportingSourceRegistrationTimeConfigEnum {
const char Include[] = …;
const char Exclude[] = …;
}
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
CRDTP_BEGIN_DESERIALIZER(…)
CRDTP_BEGIN_SERIALIZER(…);
namespace AttributionReportingEventLevelResultEnum {
const char Success[] = …;
const char SuccessDroppedLowerPriority[] = …;
const char InternalError[] = …;
const char NoCapacityForAttributionDestination[] = …;
const char NoMatchingSources[] = …;
const char Deduplicated[] = …;
const char ExcessiveAttributions[] = …;
const char PriorityTooLow[] = …;
const char NeverAttributedSource[] = …;
const char ExcessiveReportingOrigins[] = …;
const char NoMatchingSourceFilterData[] = …;
const char ProhibitedByBrowserPolicy[] = …;
const char NoMatchingConfigurations[] = …;
const char ExcessiveReports[] = …;
const char FalselyAttributedSource[] = …;
const char ReportWindowPassed[] = …;
const char NotRegistered[] = …;
const char ReportWindowNotStarted[] = …;
const char NoMatchingTriggerData[] = …;
}
namespace AttributionReportingAggregatableResultEnum {
const char Success[] = …;
const char InternalError[] = …;
const char NoCapacityForAttributionDestination[] = …;
const char NoMatchingSources[] = …;
const char ExcessiveAttributions[] = …;
const char ExcessiveReportingOrigins[] = …;
const char NoHistograms[] = …;
const char InsufficientBudget[] = …;
const char NoMatchingSourceFilterData[] = …;
const char NotRegistered[] = …;
const char ProhibitedByBrowserPolicy[] = …;
const char Deduplicated[] = …;
const char ReportWindowPassed[] = …;
const char ExcessiveReports[] = …;
}
void Frontend::CacheStorageContentUpdated(const String& origin, const String& storageKey, const String& bucketId, const String& cacheName)
{ … }
void Frontend::CacheStorageListUpdated(const String& origin, const String& storageKey, const String& bucketId)
{ … }
void Frontend::IndexedDBContentUpdated(const String& origin, const String& storageKey, const String& bucketId, const String& databaseName, const String& objectStoreName)
{ … }
void Frontend::IndexedDBListUpdated(const String& origin, const String& storageKey, const String& bucketId)
{ … }
void Frontend::InterestGroupAccessed(double accessTime, const String& type, const String& ownerOrigin, const String& name, Maybe<String> componentSellerOrigin, Maybe<double> bid, Maybe<String> bidCurrency, Maybe<String> uniqueAuctionId)
{ … }
void Frontend::InterestGroupAuctionEventOccurred(double eventTime, const String& type, const String& uniqueAuctionId, Maybe<String> parentAuctionId, Maybe<protocol::DictionaryValue> auctionConfig)
{ … }
void Frontend::InterestGroupAuctionNetworkRequestCreated(const String& type, const String& requestId, std::unique_ptr<protocol::Array<String>> auctions)
{ … }
void Frontend::SharedStorageAccessed(double accessTime, const String& type, const String& mainFrameId, const String& ownerOrigin, std::unique_ptr<protocol::Storage::SharedStorageAccessParams> params)
{ … }
void Frontend::StorageBucketCreatedOrUpdated(std::unique_ptr<protocol::Storage::StorageBucketInfo> bucketInfo)
{ … }
void Frontend::StorageBucketDeleted(const String& bucketId)
{ … }
void Frontend::AttributionReportingSourceRegistered(std::unique_ptr<protocol::Storage::AttributionReportingSourceRegistration> registration, const String& result)
{ … }
void Frontend::AttributionReportingTriggerRegistered(std::unique_ptr<protocol::Storage::AttributionReportingTriggerRegistration> registration, const String& eventLevel, const String& aggregatable)
{ … }
void Frontend::flush()
{ … }
void Frontend::sendRawNotification(std::unique_ptr<Serializable> notification)
{ … }
class DomainDispatcherImpl : public protocol::DomainDispatcher { … };
namespace {
DomainDispatcherImpl::CallHandler CommandByName(crdtp::span<uint8_t> command_name) { … }
}
std::function<void(const crdtp::Dispatchable&)> DomainDispatcherImpl::Dispatch(crdtp::span<uint8_t> command_name) { … }
namespace {
struct getStorageKeyForFrameParams : public crdtp::DeserializableProtocolObject<getStorageKeyForFrameParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::getStorageKeyForFrame(const crdtp::Dispatchable& dispatchable)
{ … }
class ClearDataForOriginCallbackImpl : public Backend::ClearDataForOriginCallback, public DomainDispatcher::Callback { … };
namespace {
struct clearDataForOriginParams : public crdtp::DeserializableProtocolObject<clearDataForOriginParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::clearDataForOrigin(const crdtp::Dispatchable& dispatchable)
{ … }
class ClearDataForStorageKeyCallbackImpl : public Backend::ClearDataForStorageKeyCallback, public DomainDispatcher::Callback { … };
namespace {
struct clearDataForStorageKeyParams : public crdtp::DeserializableProtocolObject<clearDataForStorageKeyParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::clearDataForStorageKey(const crdtp::Dispatchable& dispatchable)
{ … }
class GetCookiesCallbackImpl : public Backend::GetCookiesCallback, public DomainDispatcher::Callback { … };
namespace {
struct getCookiesParams : public crdtp::DeserializableProtocolObject<getCookiesParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::getCookies(const crdtp::Dispatchable& dispatchable)
{ … }
class SetCookiesCallbackImpl : public Backend::SetCookiesCallback, public DomainDispatcher::Callback { … };
namespace {
struct setCookiesParams : public crdtp::DeserializableProtocolObject<setCookiesParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setCookies(const crdtp::Dispatchable& dispatchable)
{ … }
class ClearCookiesCallbackImpl : public Backend::ClearCookiesCallback, public DomainDispatcher::Callback { … };
namespace {
struct clearCookiesParams : public crdtp::DeserializableProtocolObject<clearCookiesParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::clearCookies(const crdtp::Dispatchable& dispatchable)
{ … }
class GetUsageAndQuotaCallbackImpl : public Backend::GetUsageAndQuotaCallback, public DomainDispatcher::Callback { … };
namespace {
struct getUsageAndQuotaParams : public crdtp::DeserializableProtocolObject<getUsageAndQuotaParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::getUsageAndQuota(const crdtp::Dispatchable& dispatchable)
{ … }
class OverrideQuotaForOriginCallbackImpl : public Backend::OverrideQuotaForOriginCallback, public DomainDispatcher::Callback { … };
namespace {
struct overrideQuotaForOriginParams : public crdtp::DeserializableProtocolObject<overrideQuotaForOriginParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::overrideQuotaForOrigin(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct trackCacheStorageForOriginParams : public crdtp::DeserializableProtocolObject<trackCacheStorageForOriginParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::trackCacheStorageForOrigin(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct trackCacheStorageForStorageKeyParams : public crdtp::DeserializableProtocolObject<trackCacheStorageForStorageKeyParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::trackCacheStorageForStorageKey(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct trackIndexedDBForOriginParams : public crdtp::DeserializableProtocolObject<trackIndexedDBForOriginParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::trackIndexedDBForOrigin(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct trackIndexedDBForStorageKeyParams : public crdtp::DeserializableProtocolObject<trackIndexedDBForStorageKeyParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::trackIndexedDBForStorageKey(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct untrackCacheStorageForOriginParams : public crdtp::DeserializableProtocolObject<untrackCacheStorageForOriginParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::untrackCacheStorageForOrigin(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct untrackCacheStorageForStorageKeyParams : public crdtp::DeserializableProtocolObject<untrackCacheStorageForStorageKeyParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::untrackCacheStorageForStorageKey(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct untrackIndexedDBForOriginParams : public crdtp::DeserializableProtocolObject<untrackIndexedDBForOriginParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::untrackIndexedDBForOrigin(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct untrackIndexedDBForStorageKeyParams : public crdtp::DeserializableProtocolObject<untrackIndexedDBForStorageKeyParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::untrackIndexedDBForStorageKey(const crdtp::Dispatchable& dispatchable)
{ … }
class GetTrustTokensCallbackImpl : public Backend::GetTrustTokensCallback, public DomainDispatcher::Callback { … };
namespace {
}
void DomainDispatcherImpl::getTrustTokens(const crdtp::Dispatchable& dispatchable)
{ … }
class ClearTrustTokensCallbackImpl : public Backend::ClearTrustTokensCallback, public DomainDispatcher::Callback { … };
namespace {
struct clearTrustTokensParams : public crdtp::DeserializableProtocolObject<clearTrustTokensParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::clearTrustTokens(const crdtp::Dispatchable& dispatchable)
{ … }
class GetInterestGroupDetailsCallbackImpl : public Backend::GetInterestGroupDetailsCallback, public DomainDispatcher::Callback { … };
namespace {
struct getInterestGroupDetailsParams : public crdtp::DeserializableProtocolObject<getInterestGroupDetailsParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::getInterestGroupDetails(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct setInterestGroupTrackingParams : public crdtp::DeserializableProtocolObject<setInterestGroupTrackingParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setInterestGroupTracking(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct setInterestGroupAuctionTrackingParams : public crdtp::DeserializableProtocolObject<setInterestGroupAuctionTrackingParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setInterestGroupAuctionTracking(const crdtp::Dispatchable& dispatchable)
{ … }
class GetSharedStorageMetadataCallbackImpl : public Backend::GetSharedStorageMetadataCallback, public DomainDispatcher::Callback { … };
namespace {
struct getSharedStorageMetadataParams : public crdtp::DeserializableProtocolObject<getSharedStorageMetadataParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::getSharedStorageMetadata(const crdtp::Dispatchable& dispatchable)
{ … }
class GetSharedStorageEntriesCallbackImpl : public Backend::GetSharedStorageEntriesCallback, public DomainDispatcher::Callback { … };
namespace {
struct getSharedStorageEntriesParams : public crdtp::DeserializableProtocolObject<getSharedStorageEntriesParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::getSharedStorageEntries(const crdtp::Dispatchable& dispatchable)
{ … }
class SetSharedStorageEntryCallbackImpl : public Backend::SetSharedStorageEntryCallback, public DomainDispatcher::Callback { … };
namespace {
struct setSharedStorageEntryParams : public crdtp::DeserializableProtocolObject<setSharedStorageEntryParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setSharedStorageEntry(const crdtp::Dispatchable& dispatchable)
{ … }
class DeleteSharedStorageEntryCallbackImpl : public Backend::DeleteSharedStorageEntryCallback, public DomainDispatcher::Callback { … };
namespace {
struct deleteSharedStorageEntryParams : public crdtp::DeserializableProtocolObject<deleteSharedStorageEntryParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::deleteSharedStorageEntry(const crdtp::Dispatchable& dispatchable)
{ … }
class ClearSharedStorageEntriesCallbackImpl : public Backend::ClearSharedStorageEntriesCallback, public DomainDispatcher::Callback { … };
namespace {
struct clearSharedStorageEntriesParams : public crdtp::DeserializableProtocolObject<clearSharedStorageEntriesParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::clearSharedStorageEntries(const crdtp::Dispatchable& dispatchable)
{ … }
class ResetSharedStorageBudgetCallbackImpl : public Backend::ResetSharedStorageBudgetCallback, public DomainDispatcher::Callback { … };
namespace {
struct resetSharedStorageBudgetParams : public crdtp::DeserializableProtocolObject<resetSharedStorageBudgetParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::resetSharedStorageBudget(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct setSharedStorageTrackingParams : public crdtp::DeserializableProtocolObject<setSharedStorageTrackingParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setSharedStorageTracking(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct setStorageBucketTrackingParams : public crdtp::DeserializableProtocolObject<setStorageBucketTrackingParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setStorageBucketTracking(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct deleteStorageBucketParams : public crdtp::DeserializableProtocolObject<deleteStorageBucketParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::deleteStorageBucket(const crdtp::Dispatchable& dispatchable)
{ … }
class SetAttributionReportingLocalTestingModeCallbackImpl : public Backend::SetAttributionReportingLocalTestingModeCallback, public DomainDispatcher::Callback { … };
namespace {
struct setAttributionReportingLocalTestingModeParams : public crdtp::DeserializableProtocolObject<setAttributionReportingLocalTestingModeParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setAttributionReportingLocalTestingMode(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
struct setAttributionReportingTrackingParams : public crdtp::DeserializableProtocolObject<setAttributionReportingTrackingParams> { … };
CRDTP_BEGIN_DESERIALIZER(…)
}
void DomainDispatcherImpl::setAttributionReportingTracking(const crdtp::Dispatchable& dispatchable)
{ … }
class SendPendingAttributionReportsCallbackImpl : public Backend::SendPendingAttributionReportsCallback, public DomainDispatcher::Callback { … };
namespace {
}
void DomainDispatcherImpl::sendPendingAttributionReports(const crdtp::Dispatchable& dispatchable)
{ … }
namespace {
const std::vector<std::pair<crdtp::span<uint8_t>, crdtp::span<uint8_t>>>& SortedRedirects() { … }
}
void Dispatcher::wire(UberDispatcher* uber, Backend* backend)
{ … }
}
}
}