#include "net/base/data_url.h"
#include <string>
#include <string_view>
#include "base/base64.h"
#include "base/ranges/algorithm.h"
#include "base/strings/escape.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "net/base/features.h"
#include "net/base/mime_util.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
#include "url/gurl.h"
namespace net {
namespace {
bool IsBase64Whitespace(char c) { … }
bool IsDataURLReadyForDecode(std::string_view body) { … }
}
bool DataURL::Parse(const GURL& url,
std::string* mime_type,
std::string* charset,
std::string* data) { … }
Error DataURL::BuildResponse(const GURL& url,
std::string_view method,
std::string* mime_type,
std::string* charset,
std::string* data,
scoped_refptr<HttpResponseHeaders>* headers) { … }
}