#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "chrome/common/cart/commerce_hints.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/common/cart/commerce_hints.mojom-params-data.h"
#include "chrome/common/cart/commerce_hints.mojom-shared-message-ids.h"
#include "chrome/common/cart/commerce_hints.mojom-import-headers.h"
#include "chrome/common/cart/commerce_hints.mojom-test-utils.h"
namespace cart::mojom {
Product::Product()
: … { … }
Product::Product(
const ::GURL& image_url_in,
const std::string& name_in,
const std::string& product_id_in)
: … { … }
Product::~Product() = default;
void Product::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool Product::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
Heuristics::Heuristics()
: … { … }
Heuristics::Heuristics(
const std::string& version_number_in,
const std::string& hint_json_data_in,
const std::string& global_json_data_in)
: … { … }
Heuristics::~Heuristics() = default;
size_t Heuristics::Hash(size_t seed) const { … }
void Heuristics::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool Heuristics::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char CommerceHintObserver::Name_[] = …;
CommerceHintObserver::IPCStableHashFunction CommerceHintObserver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* CommerceHintObserver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t CommerceHintObserver::OnAddToCart_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnVisitCart_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnCartProductUpdated_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnVisitCheckout_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnPurchase_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnFormSubmit_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnWillSendRequest_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnNavigation_Sym::IPCStableHash() { … }
uint32_t CommerceHintObserver::OnCartExtraction_Sym::IPCStableHash() { … }
# endif
class CommerceHintObserver_OnNavigation_ForwardToCallback
: public mojo::MessageReceiver { … };
class CommerceHintObserver_OnCartExtraction_ForwardToCallback
: public mojo::MessageReceiver { … };
CommerceHintObserverProxy::CommerceHintObserverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void CommerceHintObserverProxy::OnAddToCart(
const std::optional<::GURL>& in_cart_url, const std::string& in_product_id) { … }
void CommerceHintObserverProxy::OnVisitCart(
) { … }
void CommerceHintObserverProxy::OnCartProductUpdated(
std::vector<ProductPtr> in_products) { … }
void CommerceHintObserverProxy::OnVisitCheckout(
) { … }
void CommerceHintObserverProxy::OnPurchase(
) { … }
void CommerceHintObserverProxy::OnFormSubmit(
bool in_is_purchase) { … }
void CommerceHintObserverProxy::OnWillSendRequest(
bool in_is_addtocart) { … }
void CommerceHintObserverProxy::OnNavigation(
const ::GURL& in_url, const std::string& in_version_number, OnNavigationCallback callback) { … }
void CommerceHintObserverProxy::OnCartExtraction(
OnCartExtractionCallback callback) { … }
class CommerceHintObserver_OnNavigation_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool CommerceHintObserver_OnNavigation_ForwardToCallback::Accept(
mojo::Message* message) { … }
void CommerceHintObserver_OnNavigation_ProxyToResponder::Run(
bool in_should_skip, HeuristicsPtr in_heuristics) { … }
class CommerceHintObserver_OnCartExtraction_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool CommerceHintObserver_OnCartExtraction_ForwardToCallback::Accept(
mojo::Message* message) { … }
void CommerceHintObserver_OnCartExtraction_ProxyToResponder::Run(
const std::string& in_product_id_json, const std::string& in_cart_extraction_script) { … }
bool CommerceHintObserverStubDispatch::Accept(
CommerceHintObserver* impl,
mojo::Message* message) { … }
bool CommerceHintObserverStubDispatch::AcceptWithResponder(
CommerceHintObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kCommerceHintObserverValidationInfo[] = …;
bool CommerceHintObserverRequestValidator::Accept(mojo::Message* message) { … }
bool CommerceHintObserverResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::cart::mojom::Product::DataView, ::cart::mojom::ProductPtr>::Read(
::cart::mojom::Product::DataView input,
::cart::mojom::ProductPtr* output) { … }
bool StructTraits<::cart::mojom::Heuristics::DataView, ::cart::mojom::HeuristicsPtr>::Read(
::cart::mojom::Heuristics::DataView input,
::cart::mojom::HeuristicsPtr* output) { … }
}
namespace cart::mojom {
void CommerceHintObserverInterceptorForTesting::OnAddToCart(const std::optional<::GURL>& cart_url, const std::string& product_id) { … }
void CommerceHintObserverInterceptorForTesting::OnVisitCart() { … }
void CommerceHintObserverInterceptorForTesting::OnCartProductUpdated(std::vector<ProductPtr> products) { … }
void CommerceHintObserverInterceptorForTesting::OnVisitCheckout() { … }
void CommerceHintObserverInterceptorForTesting::OnPurchase() { … }
void CommerceHintObserverInterceptorForTesting::OnFormSubmit(bool is_purchase) { … }
void CommerceHintObserverInterceptorForTesting::OnWillSendRequest(bool is_addtocart) { … }
void CommerceHintObserverInterceptorForTesting::OnNavigation(const ::GURL& url, const std::string& version_number, OnNavigationCallback callback) { … }
void CommerceHintObserverInterceptorForTesting::OnCartExtraction(OnCartExtractionCallback callback) { … }
CommerceHintObserverAsyncWaiter::CommerceHintObserverAsyncWaiter(
CommerceHintObserver* proxy) : … { … }
CommerceHintObserverAsyncWaiter::~CommerceHintObserverAsyncWaiter() = default;
void CommerceHintObserverAsyncWaiter::OnNavigation(
const ::GURL& url, const std::string& version_number, bool* out_should_skip, HeuristicsPtr* out_heuristics) { … }
void CommerceHintObserverAsyncWaiter::OnCartExtraction(
std::string* out_product_id_json, std::string* out_cart_extraction_script) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif