chromium/out/Default/gen/components/safe_browsing/content/common/safe_browsing.mojom.cc

// components/safe_browsing/content/common/safe_browsing.mojom.cc is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif

#include "components/safe_browsing/content/common/safe_browsing.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 "components/safe_browsing/content/common/safe_browsing.mojom-params-data.h"
#include "components/safe_browsing/content/common/safe_browsing.mojom-shared-message-ids.h"

#include "components/safe_browsing/content/common/safe_browsing.mojom-import-headers.h"
#include "components/safe_browsing/content/common/safe_browsing.mojom-test-utils.h"


namespace safe_browsing::mojom {
AttributeNameValue::AttributeNameValue()
    :{}

AttributeNameValue::AttributeNameValue(
    const std::string& name_in,
    const std::string& value_in)
    :{}

AttributeNameValue::~AttributeNameValue() = default;
size_t AttributeNameValue::Hash(size_t seed) const {}

void AttributeNameValue::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {}

bool AttributeNameValue::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {}
ThreatDOMDetailsNode::ThreatDOMDetailsNode()
    :{}

ThreatDOMDetailsNode::ThreatDOMDetailsNode(
    int32_t node_id_in,
    const ::GURL& url_in,
    const std::string& tag_name_in,
    const ::GURL& parent_in,
    int32_t parent_node_id_in,
    std::vector<::GURL> children_in,
    std::vector<int32_t> child_node_ids_in,
    std::vector<AttributeNameValuePtr> attributes_in,
    const std::optional<::blink::FrameToken>& child_frame_token_in,
    const std::string& inner_html_in)
    :{}

ThreatDOMDetailsNode::~ThreatDOMDetailsNode() = default;

void ThreatDOMDetailsNode::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {}

bool ThreatDOMDetailsNode::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {}
const char SafeBrowsing::Name_[] =;

SafeBrowsing::IPCStableHashFunction SafeBrowsing::MessageToMethodInfo_(mojo::Message& message) {}


const char* SafeBrowsing::MessageToMethodName_(mojo::Message& message) {}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SafeBrowsing::CreateCheckerAndCheck_Sym::IPCStableHash() {}
uint32_t SafeBrowsing::Clone_Sym::IPCStableHash() {}
# endif // !BUILDFLAG(IS_FUCHSIA)

class SafeBrowsing_CreateCheckerAndCheck_ForwardToCallback
    : public mojo::MessageReceiver {};

SafeBrowsingProxy::SafeBrowsingProxy(mojo::MessageReceiverWithResponder* receiver)
    :{}

void SafeBrowsingProxy::CreateCheckerAndCheck(
    const std::optional<::blink::LocalFrameToken>& in_frame_token, ::mojo::PendingReceiver<::safe_browsing::mojom::SafeBrowsingUrlChecker> in_receiver, const ::GURL& in_url, const std::string& in_method, const ::net::HttpRequestHeaders& in_headers, int32_t in_load_flags, bool in_has_user_gesture, bool in_originated_from_service_worker, CreateCheckerAndCheckCallback callback) {}

void SafeBrowsingProxy::Clone(
    ::mojo::PendingReceiver<SafeBrowsing> in_receiver) {}
class SafeBrowsing_CreateCheckerAndCheck_ProxyToResponder : public ::mojo::internal::ProxyToResponder {};

bool SafeBrowsing_CreateCheckerAndCheck_ForwardToCallback::Accept(
    mojo::Message* message) {}

void SafeBrowsing_CreateCheckerAndCheck_ProxyToResponder::Run(
    bool in_proceed, bool in_showed_interstitial) {}

// static
bool SafeBrowsingStubDispatch::Accept(
    SafeBrowsing* impl,
    mojo::Message* message) {}

// static
bool SafeBrowsingStubDispatch::AcceptWithResponder(
    SafeBrowsing* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kSafeBrowsingValidationInfo[] =;

bool SafeBrowsingRequestValidator::Accept(mojo::Message* message) {}

bool SafeBrowsingResponseValidator::Accept(mojo::Message* message) {}
const char ThreatReporter::Name_[] =;

ThreatReporter::IPCStableHashFunction ThreatReporter::MessageToMethodInfo_(mojo::Message& message) {}


const char* ThreatReporter::MessageToMethodName_(mojo::Message& message) {}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ThreatReporter::GetThreatDOMDetails_Sym::IPCStableHash() {}
# endif // !BUILDFLAG(IS_FUCHSIA)

class ThreatReporter_GetThreatDOMDetails_ForwardToCallback
    : public mojo::MessageReceiver {};

ThreatReporterProxy::ThreatReporterProxy(mojo::MessageReceiverWithResponder* receiver)
    :{}

void ThreatReporterProxy::GetThreatDOMDetails(
    GetThreatDOMDetailsCallback callback) {}
class ThreatReporter_GetThreatDOMDetails_ProxyToResponder : public ::mojo::internal::ProxyToResponder {};

bool ThreatReporter_GetThreatDOMDetails_ForwardToCallback::Accept(
    mojo::Message* message) {}

void ThreatReporter_GetThreatDOMDetails_ProxyToResponder::Run(
    std::vector<ThreatDOMDetailsNodePtr> in_nodes) {}

// static
bool ThreatReporterStubDispatch::Accept(
    ThreatReporter* impl,
    mojo::Message* message) {}

// static
bool ThreatReporterStubDispatch::AcceptWithResponder(
    ThreatReporter* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kThreatReporterValidationInfo[] =;

bool ThreatReporterRequestValidator::Accept(mojo::Message* message) {}

bool ThreatReporterResponseValidator::Accept(mojo::Message* message) {}
const char PhishingDetector::Name_[] =;

PhishingDetector::IPCStableHashFunction PhishingDetector::MessageToMethodInfo_(mojo::Message& message) {}


const char* PhishingDetector::MessageToMethodName_(mojo::Message& message) {}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PhishingDetector::StartPhishingDetection_Sym::IPCStableHash() {}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PhishingDetector_StartPhishingDetection_ForwardToCallback
    : public mojo::MessageReceiver {};

PhishingDetectorProxy::PhishingDetectorProxy(mojo::MessageReceiverWithResponder* receiver)
    :{}

void PhishingDetectorProxy::StartPhishingDetection(
    const ::GURL& in_url, StartPhishingDetectionCallback callback) {}
class PhishingDetector_StartPhishingDetection_ProxyToResponder : public ::mojo::internal::ProxyToResponder {};

bool PhishingDetector_StartPhishingDetection_ForwardToCallback::Accept(
    mojo::Message* message) {}

void PhishingDetector_StartPhishingDetection_ProxyToResponder::Run(
    PhishingDetectorResult in_result, std::optional<::mojo_base::ProtoWrapper> in_request) {}

// static
bool PhishingDetectorStubDispatch::Accept(
    PhishingDetector* impl,
    mojo::Message* message) {}

// static
bool PhishingDetectorStubDispatch::AcceptWithResponder(
    PhishingDetector* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPhishingDetectorValidationInfo[] =;

bool PhishingDetectorRequestValidator::Accept(mojo::Message* message) {}

bool PhishingDetectorResponseValidator::Accept(mojo::Message* message) {}
const char PhishingModelSetter::Name_[] =;

PhishingModelSetter::IPCStableHashFunction PhishingModelSetter::MessageToMethodInfo_(mojo::Message& message) {}


const char* PhishingModelSetter::MessageToMethodName_(mojo::Message& message) {}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PhishingModelSetter::SetImageEmbeddingAndPhishingFlatBufferModel_Sym::IPCStableHash() {}
uint32_t PhishingModelSetter::AttachImageEmbeddingModel_Sym::IPCStableHash() {}
uint32_t PhishingModelSetter::SetPhishingFlatBufferModel_Sym::IPCStableHash() {}
uint32_t PhishingModelSetter::ClearScorer_Sym::IPCStableHash() {}
uint32_t PhishingModelSetter::SetTestObserver_Sym::IPCStableHash() {}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PhishingModelSetter_SetTestObserver_ForwardToCallback
    : public mojo::MessageReceiver {};

PhishingModelSetterProxy::PhishingModelSetterProxy(mojo::MessageReceiverWithResponder* receiver)
    :{}

void PhishingModelSetterProxy::SetImageEmbeddingAndPhishingFlatBufferModel(
    ::base::ReadOnlySharedMemoryRegion in_region, ::base::File in_tflite_model, ::base::File in_image_embedding_model) {}

void PhishingModelSetterProxy::AttachImageEmbeddingModel(
    ::base::File in_image_embedding_model) {}

void PhishingModelSetterProxy::SetPhishingFlatBufferModel(
    ::base::ReadOnlySharedMemoryRegion in_region, ::base::File in_tflite_model) {}

void PhishingModelSetterProxy::ClearScorer(
    ) {}

void PhishingModelSetterProxy::SetTestObserver(
    ::mojo::PendingRemote<PhishingModelSetterTestObserver> in_observer, SetTestObserverCallback callback) {}
class PhishingModelSetter_SetTestObserver_ProxyToResponder : public ::mojo::internal::ProxyToResponder {};

bool PhishingModelSetter_SetTestObserver_ForwardToCallback::Accept(
    mojo::Message* message) {}

void PhishingModelSetter_SetTestObserver_ProxyToResponder::Run(
    ) {}

// static
bool PhishingModelSetterStubDispatch::Accept(
    PhishingModelSetter* impl,
    mojo::Message* message) {}

// static
bool PhishingModelSetterStubDispatch::AcceptWithResponder(
    PhishingModelSetter* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPhishingModelSetterValidationInfo[] =;

bool PhishingModelSetterRequestValidator::Accept(mojo::Message* message) {}

bool PhishingModelSetterResponseValidator::Accept(mojo::Message* message) {}
const char PhishingModelSetterTestObserver::Name_[] =;

PhishingModelSetterTestObserver::IPCStableHashFunction PhishingModelSetterTestObserver::MessageToMethodInfo_(mojo::Message& message) {}


const char* PhishingModelSetterTestObserver::MessageToMethodName_(mojo::Message& message) {}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PhishingModelSetterTestObserver::PhishingModelUpdated_Sym::IPCStableHash() {}
# endif // !BUILDFLAG(IS_FUCHSIA)

PhishingModelSetterTestObserverProxy::PhishingModelSetterTestObserverProxy(mojo::MessageReceiverWithResponder* receiver)
    :{}

void PhishingModelSetterTestObserverProxy::PhishingModelUpdated(
    ) {}

// static
bool PhishingModelSetterTestObserverStubDispatch::Accept(
    PhishingModelSetterTestObserver* impl,
    mojo::Message* message) {}

// static
bool PhishingModelSetterTestObserverStubDispatch::AcceptWithResponder(
    PhishingModelSetterTestObserver* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPhishingModelSetterTestObserverValidationInfo[] =;

bool PhishingModelSetterTestObserverRequestValidator::Accept(mojo::Message* message) {}

const char PhishingImageEmbedderDetector::Name_[] =;

PhishingImageEmbedderDetector::IPCStableHashFunction PhishingImageEmbedderDetector::MessageToMethodInfo_(mojo::Message& message) {}


const char* PhishingImageEmbedderDetector::MessageToMethodName_(mojo::Message& message) {}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PhishingImageEmbedderDetector::StartImageEmbedding_Sym::IPCStableHash() {}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PhishingImageEmbedderDetector_StartImageEmbedding_ForwardToCallback
    : public mojo::MessageReceiver {};

PhishingImageEmbedderDetectorProxy::PhishingImageEmbedderDetectorProxy(mojo::MessageReceiverWithResponder* receiver)
    :{}

void PhishingImageEmbedderDetectorProxy::StartImageEmbedding(
    const ::GURL& in_url, StartImageEmbeddingCallback callback) {}
class PhishingImageEmbedderDetector_StartImageEmbedding_ProxyToResponder : public ::mojo::internal::ProxyToResponder {};

bool PhishingImageEmbedderDetector_StartImageEmbedding_ForwardToCallback::Accept(
    mojo::Message* message) {}

void PhishingImageEmbedderDetector_StartImageEmbedding_ProxyToResponder::Run(
    PhishingImageEmbeddingResult in_result, std::optional<::mojo_base::ProtoWrapper> in_image_embedding_request) {}

// static
bool PhishingImageEmbedderDetectorStubDispatch::Accept(
    PhishingImageEmbedderDetector* impl,
    mojo::Message* message) {}

// static
bool PhishingImageEmbedderDetectorStubDispatch::AcceptWithResponder(
    PhishingImageEmbedderDetector* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPhishingImageEmbedderDetectorValidationInfo[] =;

bool PhishingImageEmbedderDetectorRequestValidator::Accept(mojo::Message* message) {}

bool PhishingImageEmbedderDetectorResponseValidator::Accept(mojo::Message* message) {}
const char ExtensionWebRequestReporter::Name_[] =;

ExtensionWebRequestReporter::IPCStableHashFunction ExtensionWebRequestReporter::MessageToMethodInfo_(mojo::Message& message) {}


const char* ExtensionWebRequestReporter::MessageToMethodName_(mojo::Message& message) {}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ExtensionWebRequestReporter::SendWebRequestData_Sym::IPCStableHash() {}
uint32_t ExtensionWebRequestReporter::Clone_Sym::IPCStableHash() {}
# endif // !BUILDFLAG(IS_FUCHSIA)

ExtensionWebRequestReporterProxy::ExtensionWebRequestReporterProxy(mojo::MessageReceiverWithResponder* receiver)
    :{}

void ExtensionWebRequestReporterProxy::SendWebRequestData(
    const std::string& in_origin_extension_id, const ::GURL& in_telemetry_url, WebRequestProtocolType in_protocol_type, WebRequestContactInitiatorType in_contact_initiator_type) {}

void ExtensionWebRequestReporterProxy::Clone(
    ::mojo::PendingReceiver<ExtensionWebRequestReporter> in_receiver) {}

// static
bool ExtensionWebRequestReporterStubDispatch::Accept(
    ExtensionWebRequestReporter* impl,
    mojo::Message* message) {}

// static
bool ExtensionWebRequestReporterStubDispatch::AcceptWithResponder(
    ExtensionWebRequestReporter* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kExtensionWebRequestReporterValidationInfo[] =;

bool ExtensionWebRequestReporterRequestValidator::Accept(mojo::Message* message) {}



}  // safe_browsing::mojom


namespace mojo {


// static
bool StructTraits<::safe_browsing::mojom::AttributeNameValue::DataView, ::safe_browsing::mojom::AttributeNameValuePtr>::Read(
    ::safe_browsing::mojom::AttributeNameValue::DataView input,
    ::safe_browsing::mojom::AttributeNameValuePtr* output) {}


// static
bool StructTraits<::safe_browsing::mojom::ThreatDOMDetailsNode::DataView, ::safe_browsing::mojom::ThreatDOMDetailsNodePtr>::Read(
    ::safe_browsing::mojom::ThreatDOMDetailsNode::DataView input,
    ::safe_browsing::mojom::ThreatDOMDetailsNodePtr* output) {}

}  // namespace mojo


// Symbols declared in the -test-utils.h header are defined here instead of a
// separate .cc file to save compile time.


namespace safe_browsing::mojom {


void SafeBrowsingInterceptorForTesting::CreateCheckerAndCheck(const std::optional<::blink::LocalFrameToken>& frame_token, ::mojo::PendingReceiver<::safe_browsing::mojom::SafeBrowsingUrlChecker> receiver, const ::GURL& url, const std::string& method, const ::net::HttpRequestHeaders& headers, int32_t load_flags, bool has_user_gesture, bool originated_from_service_worker, CreateCheckerAndCheckCallback callback) {}
void SafeBrowsingInterceptorForTesting::Clone(::mojo::PendingReceiver<SafeBrowsing> receiver) {}
SafeBrowsingAsyncWaiter::SafeBrowsingAsyncWaiter(
    SafeBrowsing* proxy) :{}

SafeBrowsingAsyncWaiter::~SafeBrowsingAsyncWaiter() = default;

void SafeBrowsingAsyncWaiter::CreateCheckerAndCheck(
    const std::optional<::blink::LocalFrameToken>& frame_token, ::mojo::PendingReceiver<::safe_browsing::mojom::SafeBrowsingUrlChecker> receiver, const ::GURL& url, const std::string& method, const ::net::HttpRequestHeaders& headers, int32_t load_flags, bool has_user_gesture, bool originated_from_service_worker, bool* out_proceed, bool* out_showed_interstitial) {}






void ThreatReporterInterceptorForTesting::GetThreatDOMDetails(GetThreatDOMDetailsCallback callback) {}
ThreatReporterAsyncWaiter::ThreatReporterAsyncWaiter(
    ThreatReporter* proxy) :{}

ThreatReporterAsyncWaiter::~ThreatReporterAsyncWaiter() = default;

void ThreatReporterAsyncWaiter::GetThreatDOMDetails(
    std::vector<ThreatDOMDetailsNodePtr>* out_nodes) {}

std::vector<ThreatDOMDetailsNodePtr> ThreatReporterAsyncWaiter::GetThreatDOMDetails(
    ) {}




void PhishingDetectorInterceptorForTesting::StartPhishingDetection(const ::GURL& url, StartPhishingDetectionCallback callback) {}
PhishingDetectorAsyncWaiter::PhishingDetectorAsyncWaiter(
    PhishingDetector* proxy) :{}

PhishingDetectorAsyncWaiter::~PhishingDetectorAsyncWaiter() = default;

void PhishingDetectorAsyncWaiter::StartPhishingDetection(
    const ::GURL& url, PhishingDetectorResult* out_result, std::optional<::mojo_base::ProtoWrapper>* out_request) {}






void PhishingModelSetterInterceptorForTesting::SetImageEmbeddingAndPhishingFlatBufferModel(::base::ReadOnlySharedMemoryRegion region, ::base::File tflite_model, ::base::File image_embedding_model) {}
void PhishingModelSetterInterceptorForTesting::AttachImageEmbeddingModel(::base::File image_embedding_model) {}
void PhishingModelSetterInterceptorForTesting::SetPhishingFlatBufferModel(::base::ReadOnlySharedMemoryRegion region, ::base::File tflite_model) {}
void PhishingModelSetterInterceptorForTesting::ClearScorer() {}
void PhishingModelSetterInterceptorForTesting::SetTestObserver(::mojo::PendingRemote<PhishingModelSetterTestObserver> observer, SetTestObserverCallback callback) {}
PhishingModelSetterAsyncWaiter::PhishingModelSetterAsyncWaiter(
    PhishingModelSetter* proxy) :{}

PhishingModelSetterAsyncWaiter::~PhishingModelSetterAsyncWaiter() = default;

void PhishingModelSetterAsyncWaiter::SetTestObserver(
    ::mojo::PendingRemote<PhishingModelSetterTestObserver> observer) {}






void PhishingModelSetterTestObserverInterceptorForTesting::PhishingModelUpdated() {}
PhishingModelSetterTestObserverAsyncWaiter::PhishingModelSetterTestObserverAsyncWaiter(
    PhishingModelSetterTestObserver* proxy) :{}

PhishingModelSetterTestObserverAsyncWaiter::~PhishingModelSetterTestObserverAsyncWaiter() = default;




void PhishingImageEmbedderDetectorInterceptorForTesting::StartImageEmbedding(const ::GURL& url, StartImageEmbeddingCallback callback) {}
PhishingImageEmbedderDetectorAsyncWaiter::PhishingImageEmbedderDetectorAsyncWaiter(
    PhishingImageEmbedderDetector* proxy) :{}

PhishingImageEmbedderDetectorAsyncWaiter::~PhishingImageEmbedderDetectorAsyncWaiter() = default;

void PhishingImageEmbedderDetectorAsyncWaiter::StartImageEmbedding(
    const ::GURL& url, PhishingImageEmbeddingResult* out_result, std::optional<::mojo_base::ProtoWrapper>* out_image_embedding_request) {}






void ExtensionWebRequestReporterInterceptorForTesting::SendWebRequestData(const std::string& origin_extension_id, const ::GURL& telemetry_url, WebRequestProtocolType protocol_type, WebRequestContactInitiatorType contact_initiator_type) {}
void ExtensionWebRequestReporterInterceptorForTesting::Clone(::mojo::PendingReceiver<ExtensionWebRequestReporter> receiver) {}
ExtensionWebRequestReporterAsyncWaiter::ExtensionWebRequestReporterAsyncWaiter(
    ExtensionWebRequestReporter* proxy) :{}

ExtensionWebRequestReporterAsyncWaiter::~ExtensionWebRequestReporterAsyncWaiter() = default;






}  // safe_browsing::mojom


#if defined(__clang__)
#pragma clang diagnostic pop
#endif