#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals.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/segmentation_internals/segmentation_internals.mojom-params-data.h"
#include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals.mojom-shared-message-ids.h"
#include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals.mojom-import-headers.h"
#include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals.mojom-test-utils.h"
namespace segmentation_internals::mojom {
ServiceStatus::ServiceStatus()
: … { … }
ServiceStatus::ServiceStatus(
bool is_initialized_in,
int32_t intialization_status_in)
: … { … }
ServiceStatus::~ServiceStatus() = default;
size_t ServiceStatus::Hash(size_t seed) const { … }
void ServiceStatus::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ServiceStatus::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SegmentInfo::SegmentInfo()
: … { … }
SegmentInfo::SegmentInfo(
const std::string& segment_name_in,
int32_t segment_id_in,
const std::string& segment_data_in,
bool can_execute_segment_in,
const std::string& prediction_result_in,
::base::Time prediction_timestamp_in)
: … { … }
SegmentInfo::~SegmentInfo() = default;
void SegmentInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SegmentInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ClientInfo::ClientInfo()
: … { … }
ClientInfo::ClientInfo(
const std::string& segmentation_key_in,
const std::string& selected_segment_in,
std::vector<SegmentInfoPtr> segment_info_in)
: … { … }
ClientInfo::~ClientInfo() = default;
void ClientInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ClientInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char PageHandlerFactory::Name_[] = …;
PageHandlerFactory::IPCStableHashFunction PageHandlerFactory::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PageHandlerFactory::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PageHandlerFactory::CreatePageHandler_Sym::IPCStableHash() { … }
# endif
PageHandlerFactoryProxy::PageHandlerFactoryProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PageHandlerFactoryProxy::CreatePageHandler(
::mojo::PendingRemote<Page> in_page, ::mojo::PendingReceiver<PageHandler> in_handler) { … }
bool PageHandlerFactoryStubDispatch::Accept(
PageHandlerFactory* impl,
mojo::Message* message) { … }
bool PageHandlerFactoryStubDispatch::AcceptWithResponder(
PageHandlerFactory* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPageHandlerFactoryValidationInfo[] = …;
bool PageHandlerFactoryRequestValidator::Accept(mojo::Message* message) { … }
const char PageHandler::Name_[] = …;
PageHandler::IPCStableHashFunction PageHandler::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PageHandler::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PageHandler::GetServiceStatus_Sym::IPCStableHash() { … }
uint32_t PageHandler::ExecuteModel_Sym::IPCStableHash() { … }
uint32_t PageHandler::OverwriteResult_Sym::IPCStableHash() { … }
uint32_t PageHandler::SetSelected_Sym::IPCStableHash() { … }
# endif
PageHandlerProxy::PageHandlerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PageHandlerProxy::GetServiceStatus(
) { … }
void PageHandlerProxy::ExecuteModel(
int32_t in_segment_id) { … }
void PageHandlerProxy::OverwriteResult(
int32_t in_segment_id, float in_result) { … }
void PageHandlerProxy::SetSelected(
const std::string& in_segmentation_key, int32_t in_optimization_target) { … }
bool PageHandlerStubDispatch::Accept(
PageHandler* impl,
mojo::Message* message) { … }
bool PageHandlerStubDispatch::AcceptWithResponder(
PageHandler* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPageHandlerValidationInfo[] = …;
bool PageHandlerRequestValidator::Accept(mojo::Message* message) { … }
const char Page::Name_[] = …;
Page::IPCStableHashFunction Page::MessageToMethodInfo_(mojo::Message& message) { … }
const char* Page::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t Page::OnServiceStatusChanged_Sym::IPCStableHash() { … }
uint32_t Page::OnClientInfoAvailable_Sym::IPCStableHash() { … }
# endif
PageProxy::PageProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PageProxy::OnServiceStatusChanged(
bool in_is_initialized, int32_t in_status_flag) { … }
void PageProxy::OnClientInfoAvailable(
std::vector<ClientInfoPtr> in_client_info) { … }
bool PageStubDispatch::Accept(
Page* impl,
mojo::Message* message) { … }
bool PageStubDispatch::AcceptWithResponder(
Page* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPageValidationInfo[] = …;
bool PageRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::segmentation_internals::mojom::ServiceStatus::DataView, ::segmentation_internals::mojom::ServiceStatusPtr>::Read(
::segmentation_internals::mojom::ServiceStatus::DataView input,
::segmentation_internals::mojom::ServiceStatusPtr* output) { … }
bool StructTraits<::segmentation_internals::mojom::SegmentInfo::DataView, ::segmentation_internals::mojom::SegmentInfoPtr>::Read(
::segmentation_internals::mojom::SegmentInfo::DataView input,
::segmentation_internals::mojom::SegmentInfoPtr* output) { … }
bool StructTraits<::segmentation_internals::mojom::ClientInfo::DataView, ::segmentation_internals::mojom::ClientInfoPtr>::Read(
::segmentation_internals::mojom::ClientInfo::DataView input,
::segmentation_internals::mojom::ClientInfoPtr* output) { … }
}
namespace segmentation_internals::mojom {
void PageHandlerFactoryInterceptorForTesting::CreatePageHandler(::mojo::PendingRemote<Page> page, ::mojo::PendingReceiver<PageHandler> handler) { … }
PageHandlerFactoryAsyncWaiter::PageHandlerFactoryAsyncWaiter(
PageHandlerFactory* proxy) : … { … }
PageHandlerFactoryAsyncWaiter::~PageHandlerFactoryAsyncWaiter() = default;
void PageHandlerInterceptorForTesting::GetServiceStatus() { … }
void PageHandlerInterceptorForTesting::ExecuteModel(int32_t segment_id) { … }
void PageHandlerInterceptorForTesting::OverwriteResult(int32_t segment_id, float result) { … }
void PageHandlerInterceptorForTesting::SetSelected(const std::string& segmentation_key, int32_t optimization_target) { … }
PageHandlerAsyncWaiter::PageHandlerAsyncWaiter(
PageHandler* proxy) : … { … }
PageHandlerAsyncWaiter::~PageHandlerAsyncWaiter() = default;
void PageInterceptorForTesting::OnServiceStatusChanged(bool is_initialized, int32_t status_flag) { … }
void PageInterceptorForTesting::OnClientInfoAvailable(std::vector<ClientInfoPtr> client_info) { … }
PageAsyncWaiter::PageAsyncWaiter(
Page* proxy) : … { … }
PageAsyncWaiter::~PageAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif