#include "net/websockets/websocket_handshake_stream_base.h"
#include <stddef.h>
#include <unordered_set>
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "net/websockets/websocket_extension.h"
#include "net/websockets/websocket_extension_parser.h"
#include "net/websockets/websocket_handshake_constants.h"
namespace net {
namespace {
size_t AddVectorHeaderIfNonEmpty(const char* name,
const std::vector<std::string>& value,
HttpRequestHeaders* headers) { … }
}
std::string WebSocketHandshakeStreamBase::MultipleHeaderValuesMessage(
const std::string& header_name) { … }
void WebSocketHandshakeStreamBase::AddVectorHeaders(
const std::vector<std::string>& extensions,
const std::vector<std::string>& protocols,
HttpRequestHeaders* headers) { … }
bool WebSocketHandshakeStreamBase::ValidateSubProtocol(
const HttpResponseHeaders* headers,
const std::vector<std::string>& requested_sub_protocols,
std::string* sub_protocol,
std::string* failure_message) { … }
bool WebSocketHandshakeStreamBase::ValidateExtensions(
const HttpResponseHeaders* headers,
std::string* accepted_extensions_descriptor,
std::string* failure_message,
WebSocketExtensionParams* params) { … }
void WebSocketHandshakeStreamBase::RecordHandshakeResult(
HandshakeResult result) { … }
}