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

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

#include <string_view>

#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/thread_pool.h"
#include "base/threading/thread_restrictions.h"
#include "net/base/filename_util.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_filter.h"
#include "net/url_request/url_request_interceptor.h"

namespace net {

namespace {

const char kMockHostname[] =;
const base::FilePath::CharType kMockHeaderFileSuffix[] =);

class MockJobInterceptor : public URLRequestInterceptor {};

std::string DoFileIO(const base::FilePath& file_path) {}

// For a given file |path| and |scheme|, return the URL served by the
// URlRequestMockHTTPJob.
GURL GetMockUrlForScheme(const std::string& path, const std::string& scheme) {}

}  // namespace

// static
void URLRequestMockHTTPJob::AddUrlHandlers(const base::FilePath& base_path) {}

// static
GURL URLRequestMockHTTPJob::GetMockUrl(const std::string& path) {}

// static
GURL URLRequestMockHTTPJob::GetMockHttpsUrl(const std::string& path) {}

// static
std::unique_ptr<URLRequestInterceptor> URLRequestMockHTTPJob::CreateInterceptor(
    const base::FilePath& base_path) {}

// static
std::unique_ptr<URLRequestInterceptor>
URLRequestMockHTTPJob::CreateInterceptorForSingleFile(
    const base::FilePath& file) {}

URLRequestMockHTTPJob::URLRequestMockHTTPJob(URLRequest* request,
                                             const base::FilePath& file_path)
    :{}

URLRequestMockHTTPJob::~URLRequestMockHTTPJob() = default;

// Public virtual version.
void URLRequestMockHTTPJob::GetResponseInfo(HttpResponseInfo* info) {}

bool URLRequestMockHTTPJob::IsRedirectResponse(
    GURL* location,
    int* http_status_code,
    bool* insecure_scheme_was_upgraded) {}

void URLRequestMockHTTPJob::OnReadComplete(net::IOBuffer* buffer, int result) {}

// Public virtual version.
void URLRequestMockHTTPJob::Start() {}

void URLRequestMockHTTPJob::SetHeadersAndStart(const std::string& raw_headers) {}

// Private const version.
void URLRequestMockHTTPJob::GetResponseInfoConst(HttpResponseInfo* info) const {}

int64_t URLRequestMockHTTPJob::GetTotalReceivedBytes() const {}

bool URLRequestMockHTTPJob::GetMimeType(std::string* mime_type) const {}

bool URLRequestMockHTTPJob::GetCharset(std::string* charset) {}

}  // namespace net