chromium/net/test/url_request/url_request_failed_job.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "net/test/url_request/url_request_failed_job.h"

#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/net_errors.h"
#include "net/base/url_util.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_filter.h"
#include "net/url_request/url_request_interceptor.h"

namespace net {

namespace {

const char kMockHostname[] =;

// String names of failure phases matching FailurePhase enum.
const char* kFailurePhase[]{};

static_assert;

class MockJobInterceptor : public URLRequestInterceptor {};

GURL GetMockUrl(const std::string& scheme,
                const std::string& hostname,
                URLRequestFailedJob::FailurePhase phase,
                int net_error) {}

}  // namespace

URLRequestFailedJob::URLRequestFailedJob(URLRequest* request,
                                         FailurePhase phase,
                                         int net_error)
    :{}

URLRequestFailedJob::URLRequestFailedJob(URLRequest* request, int net_error)
    :{}

URLRequestFailedJob::~URLRequestFailedJob() = default;

void URLRequestFailedJob::Start() {}

int URLRequestFailedJob::ReadRawData(IOBuffer* buf, int buf_size) {}

void URLRequestFailedJob::GetResponseInfo(HttpResponseInfo* info) {}

void URLRequestFailedJob::PopulateNetErrorDetails(
    NetErrorDetails* details) const {}

int64_t URLRequestFailedJob::GetTotalReceivedBytes() const {}

// static
void URLRequestFailedJob::AddUrlHandler() {}

// static
void URLRequestFailedJob::AddUrlHandlerForHostname(
    const std::string& hostname) {}

// static
GURL URLRequestFailedJob::GetMockHttpUrl(int net_error) {}

// static
GURL URLRequestFailedJob::GetMockHttpsUrl(int net_error) {}

// static
GURL URLRequestFailedJob::GetMockHttpUrlWithFailurePhase(FailurePhase phase,
                                                         int net_error) {}

// static
GURL URLRequestFailedJob::GetMockHttpUrlForHostname(
    int net_error,
    const std::string& hostname) {}

// static
GURL URLRequestFailedJob::GetMockHttpsUrlForHostname(
    int net_error,
    const std::string& hostname) {}

void URLRequestFailedJob::StartAsync() {}

}  // namespace net