#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "chrome/browser/ui/webui/discards/site_data.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "chrome/browser/ui/webui/discards/site_data.mojom-params-data.h"
#include "chrome/browser/ui/webui/discards/site_data.mojom-shared-message-ids.h"
#include "chrome/browser/ui/webui/discards/site_data.mojom-import-headers.h"
#include "chrome/browser/ui/webui/discards/site_data.mojom-test-utils.h"
namespace discards::mojom {
SiteDataFeature::SiteDataFeature()
: … { … }
SiteDataFeature::SiteDataFeature(
int64_t observation_duration_in,
int64_t use_timestamp_in)
: … { … }
SiteDataFeature::~SiteDataFeature() = default;
size_t SiteDataFeature::Hash(size_t seed) const { … }
void SiteDataFeature::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SiteDataFeature::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SiteDataPerformanceMeasurement::SiteDataPerformanceMeasurement()
: … { … }
SiteDataPerformanceMeasurement::SiteDataPerformanceMeasurement(
float avg_cpu_usage_us_in,
float avg_footprint_kb_in,
float avg_load_duration_us_in)
: … { … }
SiteDataPerformanceMeasurement::~SiteDataPerformanceMeasurement() = default;
size_t SiteDataPerformanceMeasurement::Hash(size_t seed) const { … }
void SiteDataPerformanceMeasurement::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SiteDataPerformanceMeasurement::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SiteDataDatabaseSize::SiteDataDatabaseSize()
: … { … }
SiteDataDatabaseSize::SiteDataDatabaseSize(
int64_t num_rows_in,
int64_t on_disk_size_kb_in)
: … { … }
SiteDataDatabaseSize::~SiteDataDatabaseSize() = default;
size_t SiteDataDatabaseSize::Hash(size_t seed) const { … }
void SiteDataDatabaseSize::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SiteDataDatabaseSize::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SiteDataValue::SiteDataValue()
: … { … }
SiteDataValue::SiteDataValue(
uint32_t last_loaded_in,
SiteDataFeaturePtr updates_favicon_in_background_in,
SiteDataFeaturePtr updates_title_in_background_in,
SiteDataFeaturePtr uses_audio_in_background_in,
SiteDataPerformanceMeasurementPtr load_time_estimates_in)
: … { … }
SiteDataValue::~SiteDataValue() = default;
void SiteDataValue::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SiteDataValue::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SiteDataEntry::SiteDataEntry()
: … { … }
SiteDataEntry::SiteDataEntry(
const std::string& origin_in,
bool is_dirty_in,
SiteDataValuePtr value_in)
: … { … }
SiteDataEntry::~SiteDataEntry() = default;
void SiteDataEntry::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SiteDataEntry::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SiteDataArray::SiteDataArray()
: … { … }
SiteDataArray::SiteDataArray(
std::vector<SiteDataEntryPtr> db_rows_in)
: … { … }
SiteDataArray::~SiteDataArray() = default;
void SiteDataArray::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SiteDataArray::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char SiteDataProvider::Name_[] = …;
SiteDataProvider::IPCStableHashFunction SiteDataProvider::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SiteDataProvider::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SiteDataProvider::GetSiteDataArray_Sym::IPCStableHash() { … }
uint32_t SiteDataProvider::GetSiteDataDatabaseSize_Sym::IPCStableHash() { … }
# endif
class SiteDataProvider_GetSiteDataArray_ForwardToCallback
: public mojo::MessageReceiver { … };
class SiteDataProvider_GetSiteDataDatabaseSize_ForwardToCallback
: public mojo::MessageReceiver { … };
SiteDataProviderProxy::SiteDataProviderProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SiteDataProviderProxy::GetSiteDataArray(
const std::vector<std::string>& in_explicitly_requested_origins, GetSiteDataArrayCallback callback) { … }
void SiteDataProviderProxy::GetSiteDataDatabaseSize(
GetSiteDataDatabaseSizeCallback callback) { … }
class SiteDataProvider_GetSiteDataArray_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SiteDataProvider_GetSiteDataArray_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SiteDataProvider_GetSiteDataArray_ProxyToResponder::Run(
SiteDataArrayPtr in_result) { … }
class SiteDataProvider_GetSiteDataDatabaseSize_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SiteDataProvider_GetSiteDataDatabaseSize_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SiteDataProvider_GetSiteDataDatabaseSize_ProxyToResponder::Run(
SiteDataDatabaseSizePtr in_db_size) { … }
bool SiteDataProviderStubDispatch::Accept(
SiteDataProvider* impl,
mojo::Message* message) { … }
bool SiteDataProviderStubDispatch::AcceptWithResponder(
SiteDataProvider* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSiteDataProviderValidationInfo[] = …;
bool SiteDataProviderRequestValidator::Accept(mojo::Message* message) { … }
bool SiteDataProviderResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::discards::mojom::SiteDataFeature::DataView, ::discards::mojom::SiteDataFeaturePtr>::Read(
::discards::mojom::SiteDataFeature::DataView input,
::discards::mojom::SiteDataFeaturePtr* output) { … }
bool StructTraits<::discards::mojom::SiteDataPerformanceMeasurement::DataView, ::discards::mojom::SiteDataPerformanceMeasurementPtr>::Read(
::discards::mojom::SiteDataPerformanceMeasurement::DataView input,
::discards::mojom::SiteDataPerformanceMeasurementPtr* output) { … }
bool StructTraits<::discards::mojom::SiteDataDatabaseSize::DataView, ::discards::mojom::SiteDataDatabaseSizePtr>::Read(
::discards::mojom::SiteDataDatabaseSize::DataView input,
::discards::mojom::SiteDataDatabaseSizePtr* output) { … }
bool StructTraits<::discards::mojom::SiteDataValue::DataView, ::discards::mojom::SiteDataValuePtr>::Read(
::discards::mojom::SiteDataValue::DataView input,
::discards::mojom::SiteDataValuePtr* output) { … }
bool StructTraits<::discards::mojom::SiteDataEntry::DataView, ::discards::mojom::SiteDataEntryPtr>::Read(
::discards::mojom::SiteDataEntry::DataView input,
::discards::mojom::SiteDataEntryPtr* output) { … }
bool StructTraits<::discards::mojom::SiteDataArray::DataView, ::discards::mojom::SiteDataArrayPtr>::Read(
::discards::mojom::SiteDataArray::DataView input,
::discards::mojom::SiteDataArrayPtr* output) { … }
}
namespace discards::mojom {
void SiteDataProviderInterceptorForTesting::GetSiteDataArray(const std::vector<std::string>& explicitly_requested_origins, GetSiteDataArrayCallback callback) { … }
void SiteDataProviderInterceptorForTesting::GetSiteDataDatabaseSize(GetSiteDataDatabaseSizeCallback callback) { … }
SiteDataProviderAsyncWaiter::SiteDataProviderAsyncWaiter(
SiteDataProvider* proxy) : … { … }
SiteDataProviderAsyncWaiter::~SiteDataProviderAsyncWaiter() = default;
void SiteDataProviderAsyncWaiter::GetSiteDataArray(
const std::vector<std::string>& explicitly_requested_origins, SiteDataArrayPtr* out_result) { … }
SiteDataArrayPtr SiteDataProviderAsyncWaiter::GetSiteDataArray(
const std::vector<std::string>& explicitly_requested_origins) { … }
void SiteDataProviderAsyncWaiter::GetSiteDataDatabaseSize(
SiteDataDatabaseSizePtr* out_db_size) { … }
SiteDataDatabaseSizePtr SiteDataProviderAsyncWaiter::GetSiteDataDatabaseSize(
) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif