chromium/net/http/partial_data.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/http/partial_data.h"

#include <limits>
#include <utility>

#include "base/format_macros.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "net/base/net_errors.h"
#include "net/disk_cache/disk_cache.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "net/http/http_util.h"

namespace net {

namespace {

// The headers that we have to process.
const char kLengthHeader[] =;
const char kRangeHeader[] =;
const int kDataStream =;

}  // namespace

PartialData::PartialData() = default;

PartialData::~PartialData() = default;

bool PartialData::Init(const HttpRequestHeaders& headers) {}

void PartialData::SetHeaders(const HttpRequestHeaders& headers) {}

void PartialData::RestoreHeaders(HttpRequestHeaders* headers) const {}

int PartialData::ShouldValidateCache(disk_cache::Entry* entry,
                                     CompletionOnceCallback callback) {}

void PartialData::PrepareCacheValidation(disk_cache::Entry* entry,
                                         HttpRequestHeaders* headers) {}

bool PartialData::IsCurrentRangeCached() const {}

bool PartialData::IsLastRange() const {}

bool PartialData::UpdateFromStoredHeaders(const HttpResponseHeaders* headers,
                                          disk_cache::Entry* entry,
                                          bool truncated,
                                          bool writing_in_progress) {}

void PartialData::SetRangeToStartDownload() {}

bool PartialData::IsRequestedRangeOK() {}

bool PartialData::ResponseHeadersOK(const HttpResponseHeaders* headers) {}

// We are making multiple requests to complete the range requested by the user.
// Just assume that everything is fine and say that we are returning what was
// requested.
void PartialData::FixResponseHeaders(HttpResponseHeaders* headers,
                                     bool success) {}

void PartialData::FixContentLength(HttpResponseHeaders* headers) {}

int PartialData::CacheRead(disk_cache::Entry* entry,
                           IOBuffer* data,
                           int data_len,
                           CompletionOnceCallback callback) {}

int PartialData::CacheWrite(disk_cache::Entry* entry,
                            IOBuffer* data,
                            int data_len,
                            CompletionOnceCallback callback) {}

void PartialData::OnCacheReadCompleted(int result) {}

void PartialData::OnNetworkReadCompleted(int result) {}

int PartialData::GetNextRangeLen() {}

void PartialData::GetAvailableRangeCompleted(
    const disk_cache::RangeResult& result) {}

}  // namespace net