#include "third_party/blink/renderer/core/fetch/multipart_parser.h"
#include <algorithm>
#include <utility>
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/network/http_names.h"
#include "third_party/blink/renderer/platform/network/http_parsers.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
namespace blink {
namespace {
constexpr char kCloseDelimiterSuffix[] = …;
constexpr size_t kDashBoundaryOffset = …;
constexpr char kDelimiterSuffix[] = …;
}
MultipartParser::Matcher::Matcher() = default;
MultipartParser::Matcher::Matcher(base::span<const char> match_data,
size_t num_matched_bytes)
: … { … }
bool MultipartParser::Matcher::Match(base::span<const char> data) { … }
void MultipartParser::Matcher::SetNumMatchedBytes(size_t num_matched_bytes) { … }
MultipartParser::MultipartParser(Vector<char> boundary, Client* client)
: … { … }
bool MultipartParser::AppendData(base::span<const char> bytes) { … }
void MultipartParser::Cancel() { … }
bool MultipartParser::Finish() { … }
MultipartParser::Matcher MultipartParser::CloseDelimiterSuffixMatcher() const { … }
MultipartParser::Matcher MultipartParser::DelimiterMatcher(
size_t num_already_matched_bytes) const { … }
MultipartParser::Matcher MultipartParser::DelimiterSuffixMatcher() const { … }
void MultipartParser::ParseDataAndDelimiter(base::span<const char>& bytes) { … }
void MultipartParser::ParseDelimiter(base::span<const char>& bytes) { … }
bool MultipartParser::ParseHeaderFields(base::span<const char>& bytes,
HTTPHeaderMap* header_fields) { … }
void MultipartParser::ParseTransportPadding(
base::span<const char>& bytes) const { … }
void MultipartParser::Trace(Visitor* visitor) const { … }
}