chromium/net/spdy/spdy_http_stream.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/spdy/spdy_http_stream.h"

#include <algorithm>
#include <list>
#include <set>
#include <string>
#include <string_view>
#include <utility>

#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/metrics/histogram_macros.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "net/base/ip_endpoint.h"
#include "net/base/upload_data_stream.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_request_info.h"
#include "net/http/http_response_info.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/next_proto.h"
#include "net/spdy/spdy_http_utils.h"
#include "net/spdy/spdy_session.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"
#include "url/scheme_host_port.h"

namespace net {

// Align our request body with |kMaxSpdyFrameChunkSize| to prevent unexpected
// buffer chunking. This is 16KB - frame header size.
const size_t SpdyHttpStream::kRequestBodyBufferSize =;

SpdyHttpStream::SpdyHttpStream(const base::WeakPtr<SpdySession>& spdy_session,
                               NetLogSource source_dependency,
                               std::set<std::string> dns_aliases)
    :{}

SpdyHttpStream::~SpdyHttpStream() {}

void SpdyHttpStream::RegisterRequest(const HttpRequestInfo* request_info) {}

int SpdyHttpStream::InitializeStream(bool can_send_early,
                                     RequestPriority priority,
                                     const NetLogWithSource& stream_net_log,
                                     CompletionOnceCallback callback) {}

int SpdyHttpStream::ReadResponseHeaders(CompletionOnceCallback callback) {}

int SpdyHttpStream::ReadResponseBody(IOBuffer* buf,
                                     int buf_len,
                                     CompletionOnceCallback callback) {}

void SpdyHttpStream::Close(bool not_reusable) {}

bool SpdyHttpStream::IsResponseBodyComplete() const {}

bool SpdyHttpStream::IsConnectionReused() const {}

int64_t SpdyHttpStream::GetTotalReceivedBytes() const {}

int64_t SpdyHttpStream::GetTotalSentBytes() const {}

bool SpdyHttpStream::GetAlternativeService(
    AlternativeService* alternative_service) const {}

bool SpdyHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const {}

int SpdyHttpStream::SendRequest(const HttpRequestHeaders& request_headers,
                                HttpResponseInfo* response,
                                CompletionOnceCallback callback) {}

void SpdyHttpStream::Cancel() {}

void SpdyHttpStream::OnHeadersSent() {}

void SpdyHttpStream::OnEarlyHintsReceived(
    const quiche::HttpHeaderBlock& headers) {}

void SpdyHttpStream::OnHeadersReceived(
    const quiche::HttpHeaderBlock& response_headers) {}

void SpdyHttpStream::OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) {}

void SpdyHttpStream::OnDataSent() {}

// TODO(xunjieli): Maybe do something with the trailers. crbug.com/422958.
void SpdyHttpStream::OnTrailers(const quiche::HttpHeaderBlock& trailers) {}

void SpdyHttpStream::OnClose(int status) {}

bool SpdyHttpStream::CanGreaseFrameType() const {}

NetLogSource SpdyHttpStream::source_dependency() const {}

bool SpdyHttpStream::HasUploadData() const {}

void SpdyHttpStream::OnStreamCreated(CompletionOnceCallback callback, int rv) {}

void SpdyHttpStream::ReadAndSendRequestBodyData() {}

void SpdyHttpStream::SendEmptyBody() {}

void SpdyHttpStream::InitializeStreamHelper() {}

void SpdyHttpStream::ResetStream(int error) {}

void SpdyHttpStream::OnRequestBodyReadCompleted(int status) {}

void SpdyHttpStream::MaybeScheduleBufferedReadCallback() {}

void SpdyHttpStream::DoBufferedReadCallback() {}

void SpdyHttpStream::DoRequestCallback(int rv) {}

void SpdyHttpStream::MaybeDoRequestCallback(int rv) {}

void SpdyHttpStream::MaybePostRequestCallback(int rv) {}

void SpdyHttpStream::DoResponseCallback(int rv) {}

int SpdyHttpStream::GetRemoteEndpoint(IPEndPoint* endpoint) {}

void SpdyHttpStream::PopulateNetErrorDetails(NetErrorDetails* details) {}

void SpdyHttpStream::SetPriority(RequestPriority priority) {}

const std::set<std::string>& SpdyHttpStream::GetDnsAliases() const {}

std::string_view SpdyHttpStream::GetAcceptChViaAlps() const {}

}  // namespace net