chromium/net/test/embedded_test_server/controllable_http_response.cc

// Copyright 2017 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/embedded_test_server/controllable_http_response.h"

#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/tracing.h"
#include "net/test/embedded_test_server/http_response.h"

namespace net::test_server {

class ControllableHttpResponse::Interceptor : public HttpResponse {};

ControllableHttpResponse::ControllableHttpResponse(
    EmbeddedTestServer* embedded_test_server,
    const std::string& relative_url,
    bool relative_url_is_prefix) {}

ControllableHttpResponse::~ControllableHttpResponse() = default;

void ControllableHttpResponse::WaitForRequest() {}

void ControllableHttpResponse::Send(
    net::HttpStatusCode http_status,
    const std::string& content_type,
    const std::string& content,
    const std::vector<std::string>& cookies,
    const std::vector<std::string>& extra_headers) {}

void ControllableHttpResponse::Send(const std::string& bytes) {}

void ControllableHttpResponse::Done() {}

bool ControllableHttpResponse::has_received_request() {}

void ControllableHttpResponse::OnRequest(
    scoped_refptr<base::SingleThreadTaskRunner>
        embedded_test_server_task_runner,
    base::WeakPtr<HttpResponseDelegate> delegate,
    std::unique_ptr<HttpRequest> http_request) {}

// Helper function used in the ControllableHttpResponse constructor.
// static
std::unique_ptr<HttpResponse> ControllableHttpResponse::RequestHandler(
    base::WeakPtr<ControllableHttpResponse> controller,
    scoped_refptr<base::SingleThreadTaskRunner> controller_task_runner,
    bool* available,
    const std::string& relative_url,
    bool relative_url_is_prefix,
    const HttpRequest& request) {}

}  // namespace net::test_server