#include "net/base/port_util.h"
#include <limits>
#include <set>
#include "base/containers/fixed_flat_map.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "url/url_constants.h"
namespace net {
namespace {
const int kRestrictedPorts[] = …;
base::LazyInstance<std::multiset<int>>::Leaky g_explicitly_allowed_ports = …;
constexpr int kAllowablePorts[] = …;
int g_scoped_allowable_port = …;
}
bool IsPortValid(int port) { … }
bool IsWellKnownPort(int port) { … }
bool IsPortAllowedForScheme(int port, std::string_view url_scheme) { … }
size_t GetCountOfExplicitlyAllowedPorts() { … }
void SetExplicitlyAllowedPorts(base::span<const uint16_t> allowed_ports) { … }
ScopedPortException::ScopedPortException(int port) : … { … }
ScopedPortException::~ScopedPortException() { … }
NET_EXPORT bool IsAllowablePort(int port) { … }
ScopedAllowablePortForTesting::ScopedAllowablePortForTesting(int port) { … }
ScopedAllowablePortForTesting::~ScopedAllowablePortForTesting() { … }
}