chromium/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc

// Copyright 2014 The Crashpad Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "util/net/http_multipart_builder.h"

#include <string.h>
#include <sys/types.h>

#include <utility>
#include <vector>

#include "base/check.h"
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
#include "util/net/http_body.h"
#include "util/net/http_body_gzip.h"

namespace crashpad {

namespace {

constexpr char kCRLF[] =;

constexpr char kBoundaryCRLF[] =;

// Generates a random string suitable for use as a multipart boundary.
std::string GenerateBoundaryString() {}

// Escapes the specified name to be suitable for the name field of a
// form-data part.
std::string EncodeMIMEField(const std::string& name) {}

// Returns a string, formatted with a multipart boundary and a field name,
// after which the contents of the part at |name| can be appended.
std::string GetFormDataBoundary(const std::string& boundary,
                                const std::string& name) {}

void AssertSafeMIMEType(const std::string& string) {}

}  // namespace

HTTPMultipartBuilder::HTTPMultipartBuilder()
    :{}

HTTPMultipartBuilder::~HTTPMultipartBuilder() {}

void HTTPMultipartBuilder::SetGzipEnabled(bool gzip_enabled) {}

void HTTPMultipartBuilder::SetFormData(const std::string& key,
                                       const std::string& value) {}

void HTTPMultipartBuilder::SetFileAttachment(
    const std::string& key,
    const std::string& upload_file_name,
    FileReaderInterface* reader,
    const std::string& content_type) {}

std::unique_ptr<HTTPBodyStream> HTTPMultipartBuilder::GetBodyStream() {}

void HTTPMultipartBuilder::PopulateContentHeaders(
    HTTPHeaders* http_headers) const {}

void HTTPMultipartBuilder::EraseKey(const std::string& key) {}

}  // namespace crashpad