#include "components/safe_search_api/stub_url_checker.h"
#include <utility>
#include "base/json/json_writer.h"
#include "base/values.h"
#include "components/safe_search_api/safe_search/safe_search_url_checker_client.h"
#include "components/safe_search_api/url_checker.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "url/gurl.h"
namespace safe_search_api {
namespace {
constexpr char kSafeSearchApiUrl[] = …;
std::string BuildResponse(bool is_porn) { … }
}
StubURLChecker::StubURLChecker()
: … { … }
StubURLChecker::~StubURLChecker() = default;
std::unique_ptr<URLChecker> StubURLChecker::BuildURLChecker(size_t cache_size) { … }
void StubURLChecker::SetUpValidResponse(bool is_porn) { … }
void StubURLChecker::SetUpFailedResponse() { … }
void StubURLChecker::ClearResponses() { … }
void StubURLChecker::SetUpResponse(net::Error error,
const std::string& response) { … }
}