// chrome/browser/ui/webui/feed_internals/feed_internals.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 "chrome/browser/ui/webui/feed_internals/feed_internals.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/notreached.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/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.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/feed_internals/feed_internals.mojom-params-data.h"
#include "chrome/browser/ui/webui/feed_internals/feed_internals.mojom-shared-message-ids.h"

#include "chrome/browser/ui/webui/feed_internals/feed_internals.mojom-import-headers.h"
#include "chrome/browser/ui/webui/feed_internals/feed_internals.mojom-test-utils.h"


namespace feed_internals::mojom {
Properties::Properties()
    : is_feed_enabled(),
      is_feed_visible(),
      is_feed_allowed(),
      is_prefetching_enabled(),
      load_stream_status(),
      feed_fetch_url(),
      feed_actions_url() {}

Properties::Properties(
    bool is_feed_enabled_in,
    bool is_feed_visible_in,
    bool is_feed_allowed_in,
    bool is_prefetching_enabled_in,
    const std::string& load_stream_status_in,
    const ::GURL& feed_fetch_url_in,
    const ::GURL& feed_actions_url_in)
    : is_feed_enabled(std::move(is_feed_enabled_in)),
      is_feed_visible(std::move(is_feed_visible_in)),
      is_feed_allowed(std::move(is_feed_allowed_in)),
      is_prefetching_enabled(std::move(is_prefetching_enabled_in)),
      load_stream_status(std::move(load_stream_status_in)),
      feed_fetch_url(std::move(feed_fetch_url_in)),
      feed_actions_url(std::move(feed_actions_url_in)) {}

Properties::~Properties() = default;

void Properties::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_feed_enabled"), this->is_feed_enabled,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_feed_visible"), this->is_feed_visible,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_feed_allowed"), this->is_feed_allowed,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_prefetching_enabled"), this->is_prefetching_enabled,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "load_stream_status"), this->load_stream_status,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "feed_fetch_url"), this->feed_fetch_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "feed_actions_url"), this->feed_actions_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool Properties::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
LastFetchProperties::LastFetchProperties()
    : last_fetch_status(),
      last_fetch_trigger(),
      last_fetch_time(),
      refresh_suppress_time(),
      last_bless_nonce(),
      last_action_upload_status(),
      last_action_upload_time() {}

LastFetchProperties::LastFetchProperties(
    int32_t last_fetch_status_in,
    const std::string& last_fetch_trigger_in,
    ::base::TimeDelta last_fetch_time_in,
    ::base::TimeDelta refresh_suppress_time_in,
    const std::string& last_bless_nonce_in,
    int32_t last_action_upload_status_in,
    ::base::TimeDelta last_action_upload_time_in)
    : last_fetch_status(std::move(last_fetch_status_in)),
      last_fetch_trigger(std::move(last_fetch_trigger_in)),
      last_fetch_time(std::move(last_fetch_time_in)),
      refresh_suppress_time(std::move(refresh_suppress_time_in)),
      last_bless_nonce(std::move(last_bless_nonce_in)),
      last_action_upload_status(std::move(last_action_upload_status_in)),
      last_action_upload_time(std::move(last_action_upload_time_in)) {}

LastFetchProperties::~LastFetchProperties() = default;

void LastFetchProperties::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_fetch_status"), this->last_fetch_status,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_fetch_trigger"), this->last_fetch_trigger,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_fetch_time"), this->last_fetch_time,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeDelta>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "refresh_suppress_time"), this->refresh_suppress_time,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeDelta>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_bless_nonce"), this->last_bless_nonce,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_action_upload_status"), this->last_action_upload_status,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_action_upload_time"), this->last_action_upload_time,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeDelta>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool LastFetchProperties::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
// The declaration includes the definition on other builds.

PageHandler::IPCStableHashFunction PageHandler::MessageToMethodInfo_(mojo::Message& message) {
#if !BUILDFLAG(IS_FUCHSIA)
  switch (static_cast<messages::PageHandler>(message.name())) {
    case messages::PageHandler::kGetGeneralProperties: {
      return &PageHandler::GetGeneralProperties_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetLastFetchProperties: {
      return &PageHandler::GetLastFetchProperties_Sym::IPCStableHash;
    }
    case messages::PageHandler::kRefreshForYouFeed: {
      return &PageHandler::RefreshForYouFeed_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetFeedProcessScopeDump: {
      return &PageHandler::GetFeedProcessScopeDump_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetFeedHistograms: {
      return &PageHandler::GetFeedHistograms_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOverrideFeedHost: {
      return &PageHandler::OverrideFeedHost_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOverrideDiscoverApiEndpoint: {
      return &PageHandler::OverrideDiscoverApiEndpoint_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOverrideFeedStreamData: {
      return &PageHandler::OverrideFeedStreamData_Sym::IPCStableHash;
    }
  }
#endif  // !BUILDFLAG(IS_FUCHSIA)
  return nullptr;
}


const char* PageHandler::MessageToMethodName_(mojo::Message& message) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  bool is_response = message.has_flag(mojo::Message::kFlagIsResponse);
  if (!is_response) {
    switch (static_cast<messages::PageHandler>(message.name())) {
      case messages::PageHandler::kGetGeneralProperties:
            return "Receive feed_internals::mojom::PageHandler::GetGeneralProperties";
      case messages::PageHandler::kGetLastFetchProperties:
            return "Receive feed_internals::mojom::PageHandler::GetLastFetchProperties";
      case messages::PageHandler::kRefreshForYouFeed:
            return "Receive feed_internals::mojom::PageHandler::RefreshForYouFeed";
      case messages::PageHandler::kGetFeedProcessScopeDump:
            return "Receive feed_internals::mojom::PageHandler::GetFeedProcessScopeDump";
      case messages::PageHandler::kGetFeedHistograms:
            return "Receive feed_internals::mojom::PageHandler::GetFeedHistograms";
      case messages::PageHandler::kOverrideFeedHost:
            return "Receive feed_internals::mojom::PageHandler::OverrideFeedHost";
      case messages::PageHandler::kOverrideDiscoverApiEndpoint:
            return "Receive feed_internals::mojom::PageHandler::OverrideDiscoverApiEndpoint";
      case messages::PageHandler::kOverrideFeedStreamData:
            return "Receive feed_internals::mojom::PageHandler::OverrideFeedStreamData";
    }
  } else {
    switch (static_cast<messages::PageHandler>(message.name())) {
      case messages::PageHandler::kGetGeneralProperties:
            return "Receive reply feed_internals::mojom::PageHandler::GetGeneralProperties";
      case messages::PageHandler::kGetLastFetchProperties:
            return "Receive reply feed_internals::mojom::PageHandler::GetLastFetchProperties";
      case messages::PageHandler::kRefreshForYouFeed:
            return "Receive reply feed_internals::mojom::PageHandler::RefreshForYouFeed";
      case messages::PageHandler::kGetFeedProcessScopeDump:
            return "Receive reply feed_internals::mojom::PageHandler::GetFeedProcessScopeDump";
      case messages::PageHandler::kGetFeedHistograms:
            return "Receive reply feed_internals::mojom::PageHandler::GetFeedHistograms";
      case messages::PageHandler::kOverrideFeedHost:
            return "Receive reply feed_internals::mojom::PageHandler::OverrideFeedHost";
      case messages::PageHandler::kOverrideDiscoverApiEndpoint:
            return "Receive reply feed_internals::mojom::PageHandler::OverrideDiscoverApiEndpoint";
      case messages::PageHandler::kOverrideFeedStreamData:
            return "Receive reply feed_internals::mojom::PageHandler::OverrideFeedStreamData";
    }
  }
  return "Receive unknown mojo message";
#else
  bool is_response = message.has_flag(mojo::Message::kFlagIsResponse);
  if (is_response) {
    return "Receive mojo reply";
  } else {
    return "Receive mojo message";
  }
#endif // BUILDFLAG(MOJO_TRACE_ENABLED)
}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PageHandler::GetGeneralProperties_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0xfdd0d4ab;  // IPCStableHash for feed_internals::mojom::PageHandler::GetGeneralProperties
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetLastFetchProperties_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0xe77114b7;  // IPCStableHash for feed_internals::mojom::PageHandler::GetLastFetchProperties
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::RefreshForYouFeed_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0xb43a191f;  // IPCStableHash for feed_internals::mojom::PageHandler::RefreshForYouFeed
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetFeedProcessScopeDump_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0x4a0b79f3;  // IPCStableHash for feed_internals::mojom::PageHandler::GetFeedProcessScopeDump
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetFeedHistograms_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0xc3bd0c70;  // IPCStableHash for feed_internals::mojom::PageHandler::GetFeedHistograms
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OverrideFeedHost_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0x1fb15474;  // IPCStableHash for feed_internals::mojom::PageHandler::OverrideFeedHost
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OverrideDiscoverApiEndpoint_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0x16fc6bcb;  // IPCStableHash for feed_internals::mojom::PageHandler::OverrideDiscoverApiEndpoint
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OverrideFeedStreamData_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0x4bf9675c;  // IPCStableHash for feed_internals::mojom::PageHandler::OverrideFeedStreamData
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PageHandler_GetGeneralProperties_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetGeneralProperties_ForwardToCallback(
      PageHandler::GetGeneralPropertiesCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetGeneralProperties_ForwardToCallback(const PageHandler_GetGeneralProperties_ForwardToCallback&) = delete;
  PageHandler_GetGeneralProperties_ForwardToCallback& operator=(const PageHandler_GetGeneralProperties_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetGeneralPropertiesCallback callback_;
};

class PageHandler_GetLastFetchProperties_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetLastFetchProperties_ForwardToCallback(
      PageHandler::GetLastFetchPropertiesCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetLastFetchProperties_ForwardToCallback(const PageHandler_GetLastFetchProperties_ForwardToCallback&) = delete;
  PageHandler_GetLastFetchProperties_ForwardToCallback& operator=(const PageHandler_GetLastFetchProperties_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetLastFetchPropertiesCallback callback_;
};

class PageHandler_GetFeedProcessScopeDump_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetFeedProcessScopeDump_ForwardToCallback(
      PageHandler::GetFeedProcessScopeDumpCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetFeedProcessScopeDump_ForwardToCallback(const PageHandler_GetFeedProcessScopeDump_ForwardToCallback&) = delete;
  PageHandler_GetFeedProcessScopeDump_ForwardToCallback& operator=(const PageHandler_GetFeedProcessScopeDump_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetFeedProcessScopeDumpCallback callback_;
};

class PageHandler_GetFeedHistograms_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetFeedHistograms_ForwardToCallback(
      PageHandler::GetFeedHistogramsCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetFeedHistograms_ForwardToCallback(const PageHandler_GetFeedHistograms_ForwardToCallback&) = delete;
  PageHandler_GetFeedHistograms_ForwardToCallback& operator=(const PageHandler_GetFeedHistograms_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetFeedHistogramsCallback callback_;
};

PageHandlerProxy::PageHandlerProxy(mojo::MessageReceiverWithResponder* receiver)
    : receiver_(receiver) {
}

void PageHandlerProxy::GetGeneralProperties(
    GetGeneralPropertiesCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send feed_internals::mojom::PageHandler::GetGeneralProperties");
#endif

  const bool kExpectsResponse = true;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetGeneralProperties), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetGeneralProperties_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetGeneralProperties");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetGeneralProperties_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::GetLastFetchProperties(
    GetLastFetchPropertiesCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send feed_internals::mojom::PageHandler::GetLastFetchProperties");
#endif

  const bool kExpectsResponse = true;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetLastFetchProperties), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetLastFetchProperties_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetLastFetchProperties");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetLastFetchProperties_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::RefreshForYouFeed(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send feed_internals::mojom::PageHandler::RefreshForYouFeed");
#endif

  const bool kExpectsResponse = false;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kRefreshForYouFeed), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_RefreshForYouFeed_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("RefreshForYouFeed");
#endif
  // This return value may be ignored as false implies the Connector has
  // encountered an error, which will be visible through other means.
  ::mojo::internal::SendMojoMessage(*receiver_, message);
}

void PageHandlerProxy::GetFeedProcessScopeDump(
    GetFeedProcessScopeDumpCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send feed_internals::mojom::PageHandler::GetFeedProcessScopeDump");
#endif

  const bool kExpectsResponse = true;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetFeedProcessScopeDump), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetFeedProcessScopeDump_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetFeedProcessScopeDump");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetFeedProcessScopeDump_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::GetFeedHistograms(
    GetFeedHistogramsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send feed_internals::mojom::PageHandler::GetFeedHistograms");
#endif

  const bool kExpectsResponse = true;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetFeedHistograms), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetFeedHistograms_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetFeedHistograms");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetFeedHistograms_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::OverrideFeedHost(
    const ::GURL& in_host) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send feed_internals::mojom::PageHandler::OverrideFeedHost", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("host"), in_host,
                        "<value of type const ::GURL&>");
   });
#endif

  const bool kExpectsResponse = false;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kOverrideFeedHost), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_OverrideFeedHost_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->host)::BaseType> host_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_host,
    host_fragment);

  params->host.Set(
      host_fragment.is_null() ? nullptr : host_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->host.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null host in PageHandler.OverrideFeedHost request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OverrideFeedHost");
#endif
  // This return value may be ignored as false implies the Connector has
  // encountered an error, which will be visible through other means.
  ::mojo::internal::SendMojoMessage(*receiver_, message);
}

void PageHandlerProxy::OverrideDiscoverApiEndpoint(
    const ::GURL& in_endpoint_url) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send feed_internals::mojom::PageHandler::OverrideDiscoverApiEndpoint", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("endpoint_url"), in_endpoint_url,
                        "<value of type const ::GURL&>");
   });
#endif

  const bool kExpectsResponse = false;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kOverrideDiscoverApiEndpoint), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_OverrideDiscoverApiEndpoint_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->endpoint_url)::BaseType> endpoint_url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_endpoint_url,
    endpoint_url_fragment);

  params->endpoint_url.Set(
      endpoint_url_fragment.is_null() ? nullptr : endpoint_url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->endpoint_url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null endpoint_url in PageHandler.OverrideDiscoverApiEndpoint request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OverrideDiscoverApiEndpoint");
#endif
  // This return value may be ignored as false implies the Connector has
  // encountered an error, which will be visible through other means.
  ::mojo::internal::SendMojoMessage(*receiver_, message);
}

void PageHandlerProxy::OverrideFeedStreamData(
    const std::vector<uint8_t>& in_data) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send feed_internals::mojom::PageHandler::OverrideFeedStreamData", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("data"), in_data,
                        "<value of type const std::vector<uint8_t>&>");
   });
#endif

  const bool kExpectsResponse = false;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kOverrideFeedStreamData), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_OverrideFeedStreamData_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->data)::BaseType>
      data_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& data_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<uint8_t>>(
    in_data,
    data_fragment,
    &data_validate_params);

  params->data.Set(
      data_fragment.is_null() ? nullptr : data_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->data.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null data in PageHandler.OverrideFeedStreamData request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OverrideFeedStreamData");
#endif
  // This return value may be ignored as false implies the Connector has
  // encountered an error, which will be visible through other means.
  ::mojo::internal::SendMojoMessage(*receiver_, message);
}
class PageHandler_GetGeneralProperties_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetGeneralPropertiesCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetGeneralProperties_ProxyToResponder> proxy(
        new PageHandler_GetGeneralProperties_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetGeneralProperties_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetGeneralProperties_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetGeneralProperties_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetGeneralPropertiesCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      PropertiesPtr in_properties);
};

bool PageHandler_GetGeneralProperties_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetGeneralProperties_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetGeneralProperties_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.0
  bool success = true;
  PropertiesPtr p_properties{};
  PageHandler_GetGeneralProperties_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadProperties(&p_properties))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 0, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_properties));
  }
  return true;
}

void PageHandler_GetGeneralProperties_ProxyToResponder::Run(
    PropertiesPtr in_properties) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply feed_internals::mojom::PageHandler::GetGeneralProperties", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("properties"), in_properties,
                        "<value of type PropertiesPtr>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetGeneralProperties), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetGeneralProperties_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->properties)::BaseType> properties_fragment(
          params.message());
  
  mojo::internal::Serialize<::feed_internals::mojom::PropertiesDataView>(
    in_properties,
    properties_fragment);

  params->properties.Set(
      properties_fragment.is_null() ? nullptr : properties_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->properties.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null properties in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetGeneralProperties");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetLastFetchProperties_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetLastFetchPropertiesCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetLastFetchProperties_ProxyToResponder> proxy(
        new PageHandler_GetLastFetchProperties_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetLastFetchProperties_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetLastFetchProperties_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetLastFetchProperties_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetLastFetchPropertiesCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      LastFetchPropertiesPtr in_properties);
};

bool PageHandler_GetLastFetchProperties_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetLastFetchProperties_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetLastFetchProperties_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.1
  bool success = true;
  LastFetchPropertiesPtr p_properties{};
  PageHandler_GetLastFetchProperties_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadProperties(&p_properties))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 1, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_properties));
  }
  return true;
}

void PageHandler_GetLastFetchProperties_ProxyToResponder::Run(
    LastFetchPropertiesPtr in_properties) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply feed_internals::mojom::PageHandler::GetLastFetchProperties", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("properties"), in_properties,
                        "<value of type LastFetchPropertiesPtr>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetLastFetchProperties), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetLastFetchProperties_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->properties)::BaseType> properties_fragment(
          params.message());
  
  mojo::internal::Serialize<::feed_internals::mojom::LastFetchPropertiesDataView>(
    in_properties,
    properties_fragment);

  params->properties.Set(
      properties_fragment.is_null() ? nullptr : properties_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->properties.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null properties in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetLastFetchProperties");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetFeedProcessScopeDump_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetFeedProcessScopeDumpCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetFeedProcessScopeDump_ProxyToResponder> proxy(
        new PageHandler_GetFeedProcessScopeDump_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetFeedProcessScopeDump_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetFeedProcessScopeDump_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetFeedProcessScopeDump_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetFeedProcessScopeDumpCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::string& in_dump);
};

bool PageHandler_GetFeedProcessScopeDump_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetFeedProcessScopeDump_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetFeedProcessScopeDump_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.3
  bool success = true;
  std::string p_dump{};
  PageHandler_GetFeedProcessScopeDump_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadDump(&p_dump))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 3, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_dump));
  }
  return true;
}

void PageHandler_GetFeedProcessScopeDump_ProxyToResponder::Run(
    const std::string& in_dump) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply feed_internals::mojom::PageHandler::GetFeedProcessScopeDump", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("dump"), in_dump,
                        "<value of type const std::string&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetFeedProcessScopeDump), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetFeedProcessScopeDump_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->dump)::BaseType> dump_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_dump,
    dump_fragment);

  params->dump.Set(
      dump_fragment.is_null() ? nullptr : dump_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->dump.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null dump in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetFeedProcessScopeDump");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetFeedHistograms_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetFeedHistogramsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetFeedHistograms_ProxyToResponder> proxy(
        new PageHandler_GetFeedHistograms_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetFeedHistograms_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetFeedHistograms_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetFeedHistograms_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetFeedHistogramsCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::string& in_log);
};

bool PageHandler_GetFeedHistograms_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetFeedHistograms_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetFeedHistograms_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.4
  bool success = true;
  std::string p_log{};
  PageHandler_GetFeedHistograms_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadLog(&p_log))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 4, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_log));
  }
  return true;
}

void PageHandler_GetFeedHistograms_ProxyToResponder::Run(
    const std::string& in_log) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply feed_internals::mojom::PageHandler::GetFeedHistograms", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("log"), in_log,
                        "<value of type const std::string&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetFeedHistograms), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::feed_internals::mojom::internal::PageHandler_GetFeedHistograms_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->log)::BaseType> log_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_log,
    log_fragment);

  params->log.Set(
      log_fragment.is_null() ? nullptr : log_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->log.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null log in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetFeedHistograms");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}

// static
bool PageHandlerStubDispatch::Accept(
    PageHandler* impl,
    mojo::Message* message) {
  switch (static_cast<messages::PageHandler>(message->header()->name)) {
    case messages::PageHandler::kGetGeneralProperties: {
      break;
    }
    case messages::PageHandler::kGetLastFetchProperties: {
      break;
    }
    case messages::PageHandler::kRefreshForYouFeed: {
      DCHECK(message->is_serialized());
      internal::PageHandler_RefreshForYouFeed_Params_Data* params =
          reinterpret_cast<internal::PageHandler_RefreshForYouFeed_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.2
      bool success = true;
      PageHandler_RefreshForYouFeed_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 2, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->RefreshForYouFeed(        );
      return true;
    }
    case messages::PageHandler::kGetFeedProcessScopeDump: {
      break;
    }
    case messages::PageHandler::kGetFeedHistograms: {
      break;
    }
    case messages::PageHandler::kOverrideFeedHost: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OverrideFeedHost_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OverrideFeedHost_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.5
      bool success = true;
      ::GURL p_host{};
      PageHandler_OverrideFeedHost_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadHost(&p_host))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 5, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OverrideFeedHost(        
        std::move(p_host));
      return true;
    }
    case messages::PageHandler::kOverrideDiscoverApiEndpoint: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OverrideDiscoverApiEndpoint_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OverrideDiscoverApiEndpoint_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.6
      bool success = true;
      ::GURL p_endpoint_url{};
      PageHandler_OverrideDiscoverApiEndpoint_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadEndpointUrl(&p_endpoint_url))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 6, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OverrideDiscoverApiEndpoint(        
        std::move(p_endpoint_url));
      return true;
    }
    case messages::PageHandler::kOverrideFeedStreamData: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OverrideFeedStreamData_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OverrideFeedStreamData_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.7
      bool success = true;
      std::vector<uint8_t> p_data{};
      PageHandler_OverrideFeedStreamData_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadData(&p_data))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 7, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OverrideFeedStreamData(        
        std::move(p_data));
      return true;
    }
  }
  return false;
}

// static
bool PageHandlerStubDispatch::AcceptWithResponder(
    PageHandler* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
  [[maybe_unused]] const bool message_is_sync =
      message->has_flag(mojo::Message::kFlagIsSync);
  [[maybe_unused]] const uint64_t request_id = message->request_id();
  switch (static_cast<messages::PageHandler>(message->header()->name)) {
    case messages::PageHandler::kGetGeneralProperties: {
      internal::PageHandler_GetGeneralProperties_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetGeneralProperties_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.0
      bool success = true;
      PageHandler_GetGeneralProperties_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 0, false);
        return false;
      }
      auto callback =
          PageHandler_GetGeneralProperties_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetGeneralProperties(std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetLastFetchProperties: {
      internal::PageHandler_GetLastFetchProperties_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetLastFetchProperties_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.1
      bool success = true;
      PageHandler_GetLastFetchProperties_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 1, false);
        return false;
      }
      auto callback =
          PageHandler_GetLastFetchProperties_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetLastFetchProperties(std::move(callback));
      return true;
    }
    case messages::PageHandler::kRefreshForYouFeed: {
      break;
    }
    case messages::PageHandler::kGetFeedProcessScopeDump: {
      internal::PageHandler_GetFeedProcessScopeDump_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetFeedProcessScopeDump_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.3
      bool success = true;
      PageHandler_GetFeedProcessScopeDump_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 3, false);
        return false;
      }
      auto callback =
          PageHandler_GetFeedProcessScopeDump_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetFeedProcessScopeDump(std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetFeedHistograms: {
      internal::PageHandler_GetFeedHistograms_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetFeedHistograms_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.4
      bool success = true;
      PageHandler_GetFeedHistograms_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 4, false);
        return false;
      }
      auto callback =
          PageHandler_GetFeedHistograms_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetFeedHistograms(std::move(callback));
      return true;
    }
    case messages::PageHandler::kOverrideFeedHost: {
      break;
    }
    case messages::PageHandler::kOverrideDiscoverApiEndpoint: {
      break;
    }
    case messages::PageHandler::kOverrideFeedStreamData: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageHandlerValidationInfo[] = {
    { &internal::PageHandler_GetGeneralProperties_Params_Data::Validate,
     &internal::PageHandler_GetGeneralProperties_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetLastFetchProperties_Params_Data::Validate,
     &internal::PageHandler_GetLastFetchProperties_ResponseParams_Data::Validate},
    { &internal::PageHandler_RefreshForYouFeed_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_GetFeedProcessScopeDump_Params_Data::Validate,
     &internal::PageHandler_GetFeedProcessScopeDump_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetFeedHistograms_Params_Data::Validate,
     &internal::PageHandler_GetFeedHistograms_ResponseParams_Data::Validate},
    { &internal::PageHandler_OverrideFeedHost_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OverrideDiscoverApiEndpoint_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OverrideFeedStreamData_Params_Data::Validate,
     nullptr /* no response */},
};

bool PageHandlerRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::feed_internals::mojom::PageHandler::Name_,
    kPageHandlerValidationInfo);
}

bool PageHandlerResponseValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateResponseGenericPacked(
    message,
    ::feed_internals::mojom::PageHandler::Name_,
    kPageHandlerValidationInfo);
}


}  // feed_internals::mojom


namespace mojo {


// static
bool StructTraits<::feed_internals::mojom::Properties::DataView, ::feed_internals::mojom::PropertiesPtr>::Read(
    ::feed_internals::mojom::Properties::DataView input,
    ::feed_internals::mojom::PropertiesPtr* output) {
  bool success = true;
  ::feed_internals::mojom::PropertiesPtr result(::feed_internals::mojom::Properties::New());
  
      if (success)
        result->is_feed_enabled = input.is_feed_enabled();
      if (success)
        result->is_feed_visible = input.is_feed_visible();
      if (success)
        result->is_feed_allowed = input.is_feed_allowed();
      if (success)
        result->is_prefetching_enabled = input.is_prefetching_enabled();
      if (success && !input.ReadLoadStreamStatus(&result->load_stream_status))
        success = false;
      if (success && !input.ReadFeedFetchUrl(&result->feed_fetch_url))
        success = false;
      if (success && !input.ReadFeedActionsUrl(&result->feed_actions_url))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::feed_internals::mojom::LastFetchProperties::DataView, ::feed_internals::mojom::LastFetchPropertiesPtr>::Read(
    ::feed_internals::mojom::LastFetchProperties::DataView input,
    ::feed_internals::mojom::LastFetchPropertiesPtr* output) {
  bool success = true;
  ::feed_internals::mojom::LastFetchPropertiesPtr result(::feed_internals::mojom::LastFetchProperties::New());
  
      if (success)
        result->last_fetch_status = input.last_fetch_status();
      if (success && !input.ReadLastFetchTrigger(&result->last_fetch_trigger))
        success = false;
      if (success && !input.ReadLastFetchTime(&result->last_fetch_time))
        success = false;
      if (success && !input.ReadRefreshSuppressTime(&result->refresh_suppress_time))
        success = false;
      if (success && !input.ReadLastBlessNonce(&result->last_bless_nonce))
        success = false;
      if (success)
        result->last_action_upload_status = input.last_action_upload_status();
      if (success && !input.ReadLastActionUploadTime(&result->last_action_upload_time))
        success = false;
  *output = std::move(result);
  return success;
}

}  // namespace mojo


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


namespace feed_internals::mojom {


void PageHandlerInterceptorForTesting::GetGeneralProperties(GetGeneralPropertiesCallback callback) {
  GetForwardingInterface()->GetGeneralProperties(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetLastFetchProperties(GetLastFetchPropertiesCallback callback) {
  GetForwardingInterface()->GetLastFetchProperties(std::move(callback));
}
void PageHandlerInterceptorForTesting::RefreshForYouFeed() {
  GetForwardingInterface()->RefreshForYouFeed();
}
void PageHandlerInterceptorForTesting::GetFeedProcessScopeDump(GetFeedProcessScopeDumpCallback callback) {
  GetForwardingInterface()->GetFeedProcessScopeDump(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetFeedHistograms(GetFeedHistogramsCallback callback) {
  GetForwardingInterface()->GetFeedHistograms(std::move(callback));
}
void PageHandlerInterceptorForTesting::OverrideFeedHost(const ::GURL& host) {
  GetForwardingInterface()->OverrideFeedHost(
    std::move(host)
    );
}
void PageHandlerInterceptorForTesting::OverrideDiscoverApiEndpoint(const ::GURL& endpoint_url) {
  GetForwardingInterface()->OverrideDiscoverApiEndpoint(
    std::move(endpoint_url)
    );
}
void PageHandlerInterceptorForTesting::OverrideFeedStreamData(const std::vector<uint8_t>& data) {
  GetForwardingInterface()->OverrideFeedStreamData(
    std::move(data)
    );
}
PageHandlerAsyncWaiter::PageHandlerAsyncWaiter(
    PageHandler* proxy) : proxy_(proxy) {}

PageHandlerAsyncWaiter::~PageHandlerAsyncWaiter() = default;


void PageHandlerAsyncWaiter::GetGeneralProperties(
    PropertiesPtr* out_properties) {
  base::RunLoop loop;
  proxy_->GetGeneralProperties(
      base::BindOnce(
          [](base::RunLoop* loop,
             PropertiesPtr* out_properties
,
             PropertiesPtr properties) {*out_properties = std::move(properties);
            loop->Quit();
          },
          &loop,
          out_properties));
  loop.Run();
}

PropertiesPtr PageHandlerAsyncWaiter::GetGeneralProperties(
    ) {
  PropertiesPtr async_wait_result;
  GetGeneralProperties(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetLastFetchProperties(
    LastFetchPropertiesPtr* out_properties) {
  base::RunLoop loop;
  proxy_->GetLastFetchProperties(
      base::BindOnce(
          [](base::RunLoop* loop,
             LastFetchPropertiesPtr* out_properties
,
             LastFetchPropertiesPtr properties) {*out_properties = std::move(properties);
            loop->Quit();
          },
          &loop,
          out_properties));
  loop.Run();
}

LastFetchPropertiesPtr PageHandlerAsyncWaiter::GetLastFetchProperties(
    ) {
  LastFetchPropertiesPtr async_wait_result;
  GetLastFetchProperties(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetFeedProcessScopeDump(
    std::string* out_dump) {
  base::RunLoop loop;
  proxy_->GetFeedProcessScopeDump(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::string* out_dump
,
             const std::string& dump) {*out_dump = std::move(dump);
            loop->Quit();
          },
          &loop,
          out_dump));
  loop.Run();
}

std::string PageHandlerAsyncWaiter::GetFeedProcessScopeDump(
    ) {
  std::string async_wait_result;
  GetFeedProcessScopeDump(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetFeedHistograms(
    std::string* out_log) {
  base::RunLoop loop;
  proxy_->GetFeedHistograms(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::string* out_log
,
             const std::string& log) {*out_log = std::move(log);
            loop->Quit();
          },
          &loop,
          out_log));
  loop.Run();
}

std::string PageHandlerAsyncWaiter::GetFeedHistograms(
    ) {
  std::string async_wait_result;
  GetFeedHistograms(&async_wait_result);
  return async_wait_result;
}






}  // feed_internals::mojom


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