chromium/headless/test/test_network_interceptor.cc

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

#include "headless/test/test_network_interceptor.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
#include "net/url_request/redirect_info.h"
#include "net/url_request/redirect_util.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"

namespace headless {

namespace {

class RedirectLoader : public network::mojom::URLLoader {};

}  // namespace

class TestNetworkInterceptor::Impl {};

void RedirectLoader::FollowRedirect(
    const std::vector<std::string>& removed_headers /* unused */,
    const net::HttpRequestHeaders& modified_headers /* unused */,
    const net::HttpRequestHeaders& modified_cors_exempt_headers /* unused */,
    const std::optional<GURL>& new_url) {}

TestNetworkInterceptor::Response::Response(const std::string data) {}

TestNetworkInterceptor::Response::Response(const std::string body,
                                           const std::string& mime_type)
    :{}

TestNetworkInterceptor::Response::Response(const Response& r) = default;
TestNetworkInterceptor::Response::Response(Response&& r) = default;

TestNetworkInterceptor::Response::~Response() {}

TestNetworkInterceptor::TestNetworkInterceptor() {}

TestNetworkInterceptor::~TestNetworkInterceptor() {}

void TestNetworkInterceptor::InsertResponse(std::string url,
                                            Response response) {}

void TestNetworkInterceptor::LogRequest(std::string method, std::string url) {}

}  // namespace headless