#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "content/common/download/mhtml_file_writer.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 "content/common/download/mhtml_file_writer.mojom-params-data.h"
#include "content/common/download/mhtml_file_writer.mojom-shared-message-ids.h"
#include "content/common/download/mhtml_file_writer.mojom-import-headers.h"
#include "content/common/download/mhtml_file_writer.mojom-test-utils.h"
namespace content::mojom {
SerializeAsMHTMLParams::SerializeAsMHTMLParams()
: … { … }
SerializeAsMHTMLParams::SerializeAsMHTMLParams(
const std::string& mhtml_boundary_marker_in,
bool mhtml_binary_encoding_in,
bool mhtml_popup_overlay_removal_in,
std::vector<std::string> digests_of_uris_to_skip_in,
const std::string& salt_in,
MhtmlOutputHandlePtr output_handle_in)
: … { … }
SerializeAsMHTMLParams::~SerializeAsMHTMLParams() = default;
void SerializeAsMHTMLParams::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SerializeAsMHTMLParams::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
MhtmlOutputHandle::MhtmlOutputHandle() : … { … }
MhtmlOutputHandle::~MhtmlOutputHandle() { … }
void MhtmlOutputHandle::set_file_handle(
::base::File file_handle) { … }
void MhtmlOutputHandle::set_producer_handle(
::mojo::ScopedDataPipeProducerHandle producer_handle) { … }
void MhtmlOutputHandle::DestroyActive() { … }
bool MhtmlOutputHandle::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char MhtmlFileWriter::Name_[] = …;
MhtmlFileWriter::IPCStableHashFunction MhtmlFileWriter::MessageToMethodInfo_(mojo::Message& message) { … }
const char* MhtmlFileWriter::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t MhtmlFileWriter::SerializeAsMHTML_Sym::IPCStableHash() { … }
# endif
class MhtmlFileWriter_SerializeAsMHTML_ForwardToCallback
: public mojo::MessageReceiver { … };
MhtmlFileWriterProxy::MhtmlFileWriterProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void MhtmlFileWriterProxy::SerializeAsMHTML(
SerializeAsMHTMLParamsPtr in_params, SerializeAsMHTMLCallback callback) { … }
class MhtmlFileWriter_SerializeAsMHTML_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool MhtmlFileWriter_SerializeAsMHTML_ForwardToCallback::Accept(
mojo::Message* message) { … }
void MhtmlFileWriter_SerializeAsMHTML_ProxyToResponder::Run(
MhtmlSaveStatus in_status, const std::vector<std::string>& in_digests_of_uris_to_skip) { … }
bool MhtmlFileWriterStubDispatch::Accept(
MhtmlFileWriter* impl,
mojo::Message* message) { … }
bool MhtmlFileWriterStubDispatch::AcceptWithResponder(
MhtmlFileWriter* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kMhtmlFileWriterValidationInfo[] = …;
bool MhtmlFileWriterRequestValidator::Accept(mojo::Message* message) { … }
bool MhtmlFileWriterResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::content::mojom::SerializeAsMHTMLParams::DataView, ::content::mojom::SerializeAsMHTMLParamsPtr>::Read(
::content::mojom::SerializeAsMHTMLParams::DataView input,
::content::mojom::SerializeAsMHTMLParamsPtr* output) { … }
bool UnionTraits<::content::mojom::MhtmlOutputHandle::DataView, ::content::mojom::MhtmlOutputHandlePtr>::Read(
::content::mojom::MhtmlOutputHandle::DataView input,
::content::mojom::MhtmlOutputHandlePtr* output) { … }
}
namespace content::mojom {
void MhtmlFileWriterInterceptorForTesting::SerializeAsMHTML(SerializeAsMHTMLParamsPtr params, SerializeAsMHTMLCallback callback) { … }
MhtmlFileWriterAsyncWaiter::MhtmlFileWriterAsyncWaiter(
MhtmlFileWriter* proxy) : … { … }
MhtmlFileWriterAsyncWaiter::~MhtmlFileWriterAsyncWaiter() = default;
void MhtmlFileWriterAsyncWaiter::SerializeAsMHTML(
SerializeAsMHTMLParamsPtr params, MhtmlSaveStatus* out_status, std::vector<std::string>* out_digests_of_uris_to_skip) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif