#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/fetch/form_data_bytes_consumer.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/fetch/blob_bytes_consumer.h"
#include "third_party/blink/renderer/core/fileapi/file_backed_blob_factory_dispatcher.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h"
#include "third_party/blink/renderer/platform/blob/blob_data.h"
#include "third_party/blink/renderer/platform/file_metadata.h"
#include "third_party/blink/renderer/platform/loader/fetch/data_pipe_bytes_consumer.h"
#include "third_party/blink/renderer/platform/network/encoded_form_data.h"
#include "third_party/blink/renderer/platform/network/form_data_encoder.h"
#include "third_party/blink/renderer/platform/network/wrapped_data_pipe_getter.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/text/text_codec.h"
#include "third_party/blink/renderer/platform/wtf/text/text_encoding.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
namespace {
enum class FormDataType { … };
FormDataType GetType(const EncodedFormData* form_data) { … }
class SimpleFormDataBytesConsumer : public BytesConsumer { … };
class DataPipeAndDataBytesConsumer final : public BytesConsumer { … };
class ComplexFormDataBytesConsumer final : public BytesConsumer { … };
}
FormDataBytesConsumer::FormDataBytesConsumer(const String& string)
: … { … }
FormDataBytesConsumer::FormDataBytesConsumer(DOMArrayBuffer* buffer)
: … { … }
FormDataBytesConsumer::FormDataBytesConsumer(DOMArrayBufferView* view)
: … { … }
FormDataBytesConsumer::FormDataBytesConsumer(SegmentedBuffer&& buffer)
: … { … }
FormDataBytesConsumer::FormDataBytesConsumer(const void* data, wtf_size_t size)
: … { … }
FormDataBytesConsumer::FormDataBytesConsumer(
ExecutionContext* execution_context,
scoped_refptr<EncodedFormData> form_data)
: … { … }
FormDataBytesConsumer::FormDataBytesConsumer(
ExecutionContext* execution_context,
scoped_refptr<EncodedFormData> form_data,
BytesConsumer* consumer_for_testing)
: … { … }
BytesConsumer* FormDataBytesConsumer::GetImpl(
ExecutionContext* execution_context,
scoped_refptr<EncodedFormData> form_data,
BytesConsumer* consumer_for_testing) { … }
}