#include "search_preload_test_response_utils.h"
#include <memory>
#include <string>
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_split.h"
#include "content/public/browser/browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
SearchPreloadDeferrableResponse::SearchPreloadDeferrableResponse(
SearchPreloadResponseController* test_harness,
SearchPreloadTestResponseDeferralType deferral_type,
net::HttpStatusCode code,
base::StringPairs headers,
const std::string& response_body)
: … { … }
SearchPreloadDeferrableResponse::~SearchPreloadDeferrableResponse() = default;
void SearchPreloadDeferrableResponse::SendResponse(
base::WeakPtr<net::test_server::HttpResponseDelegate> delegate) { … }
SearchPreloadResponseController::SearchPreloadResponseController() = default;
SearchPreloadResponseController::~SearchPreloadResponseController() = default;
class SearchPreloadResponseController::DelayedResponseTask { … };
void SearchPreloadResponseController::AddDelayedResponseTask(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
base::OnceClosure response_closure) { … }
void SearchPreloadResponseController::DispatchDelayedResponseTask() { … }
std::unique_ptr<net::test_server::HttpResponse>
SearchPreloadResponseController::CreateDeferrableResponse(
net::HttpStatusCode code,
const base::StringPairs& headers,
const std::string& response_body) { … }