#include <algorithm>
#include "base/debug/crash_logging.h"
#include "content/browser/shared_storage/shared_storage_event_params.h"
namespace content {
const size_t kSharedStorageSerializedDataLengthLimitForEventParams = …;
std::string MaybeTruncateSerializedData(
const blink::CloneableMessage& serialized_data) { … }
SharedStorageEventParams::SharedStorageUrlSpecWithMetadata::
SharedStorageUrlSpecWithMetadata() = default;
SharedStorageEventParams::SharedStorageUrlSpecWithMetadata::
SharedStorageUrlSpecWithMetadata(
const GURL& url,
std::map<std::string, std::string> reporting_metadata)
: … { … }
SharedStorageEventParams::SharedStorageUrlSpecWithMetadata::
SharedStorageUrlSpecWithMetadata(const SharedStorageUrlSpecWithMetadata&) =
default;
SharedStorageEventParams::SharedStorageUrlSpecWithMetadata::
~SharedStorageUrlSpecWithMetadata() = default;
SharedStorageEventParams::SharedStorageUrlSpecWithMetadata&
SharedStorageEventParams::SharedStorageUrlSpecWithMetadata::operator=(
const SharedStorageUrlSpecWithMetadata&) = default;
bool SharedStorageEventParams::SharedStorageUrlSpecWithMetadata::operator==(
const SharedStorageUrlSpecWithMetadata& other) const { … }
SharedStorageEventParams::SharedStorageEventParams(
const SharedStorageEventParams&) = default;
SharedStorageEventParams::~SharedStorageEventParams() = default;
SharedStorageEventParams& SharedStorageEventParams::operator=(
const SharedStorageEventParams&) = default;
SharedStorageEventParams::SharedStorageEventParams() = default;
SharedStorageEventParams::SharedStorageEventParams(
std::optional<std::string> script_source_url,
std::optional<std::string> operation_name,
std::optional<std::string> serialized_data,
std::optional<std::vector<SharedStorageUrlSpecWithMetadata>>
urls_with_metadata,
std::optional<std::string> key,
std::optional<std::string> value,
std::optional<bool> ignore_if_present)
: … { … }
SharedStorageEventParams SharedStorageEventParams::CreateForAddModule(
const GURL& script_source_url) { … }
SharedStorageEventParams SharedStorageEventParams::CreateForRun(
const std::string& operation_name,
const blink::CloneableMessage& serialized_data) { … }
SharedStorageEventParams SharedStorageEventParams::CreateForSelectURL(
const std::string& operation_name,
const blink::CloneableMessage& serialized_data,
std::vector<SharedStorageUrlSpecWithMetadata> urls_with_metadata) { … }
SharedStorageEventParams SharedStorageEventParams::CreateForSet(
const std::string& key,
const std::string& value,
bool ignore_if_present) { … }
SharedStorageEventParams SharedStorageEventParams::CreateForAppend(
const std::string& key,
const std::string& value) { … }
SharedStorageEventParams SharedStorageEventParams::CreateForGetOrDelete(
const std::string& key) { … }
SharedStorageEventParams SharedStorageEventParams::CreateDefault() { … }
}