#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "services/network/orb/orb_sniffers.h"
#include <stddef.h>
#include <set>
#include <string>
#include <unordered_set>
#include <vector>
#include "base/check_op.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/containers/fixed_flat_set.h"
#include "base/lazy_instance.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "net/base/mime_sniffer.h"
namespace network::orb {
namespace {
void AdvancePastWhitespace(std::string_view* data) { … }
SniffingResult MatchesSignature(std::string_view* data,
const std::string_view signatures[],
size_t arr_size,
base::CompareCase compare_case) { … }
size_t FindFirstJavascriptLineTerminator(std::string_view hay, size_t pos) { … }
SniffingResult MaybeSkipHtmlComment(std::string_view* data) { … }
}
SniffingResult SniffForHTML(std::string_view data) { … }
SniffingResult SniffForXML(std::string_view data) { … }
SniffingResult SniffForJSON(std::string_view data) { … }
SniffingResult SniffForFetchOnlyResource(std::string_view data) { … }
}