#include "components/web_package/web_bundle_builder.h"
#include <string.h>
#include <ostream>
#include <string_view>
#include "base/numerics/byte_conversions.h"
namespace web_package {
namespace {
cbor::Value CreateByteString(std::string_view s) { … }
cbor::Value CreateHeaderMap(const WebBundleBuilder::Headers& headers) { … }
uint64_t GetNumUintBytes(uint64_t value) { … }
}
WebBundleBuilder::WebBundleBuilder(BundleVersion version,
bool allow_invalid_utf8_strings_for_testing)
: … { … }
WebBundleBuilder::~WebBundleBuilder() = default;
cbor::Value WebBundleBuilder::GetCborValueOfURL(std::string_view url) { … }
void WebBundleBuilder::AddExchange(const GURL& url,
const Headers& response_headers,
std::string_view payload) { … }
void WebBundleBuilder::AddExchange(std::string_view url,
const Headers& response_headers,
std::string_view payload) { … }
WebBundleBuilder::ResponseLocation WebBundleBuilder::AddResponse(
const Headers& headers,
std::string_view payload) { … }
void WebBundleBuilder::AddIndexEntry(
const GURL& url,
const ResponseLocation& response_location) { … }
void WebBundleBuilder::AddIndexEntry(
std::string_view url,
const ResponseLocation& response_location) { … }
void WebBundleBuilder::AddSection(std::string_view name, cbor::Value section) { … }
void WebBundleBuilder::AddPrimaryURL(const GURL& url) { … }
void WebBundleBuilder::AddPrimaryURL(std::string_view url) { … }
std::vector<uint8_t> WebBundleBuilder::CreateBundle() { … }
std::vector<uint8_t> WebBundleBuilder::CreateTopLevel() { … }
std::vector<uint8_t> WebBundleBuilder::Encode(const cbor::Value& value) { … }
int64_t WebBundleBuilder::EncodedLength(const cbor::Value& value) { … }
}