#include "components/supervised_user/test_support/kids_management_api_server_mock.h"
#include <memory>
#include <string_view>
#include "base/functional/bind.h"
#include "base/strings/strcat.h"
#include "base/test/scoped_feature_list.h"
#include "components/supervised_user/core/browser/fetcher_config.h"
#include "components/supervised_user/core/browser/proto/kidsmanagement_messages.pb.h"
#include "components/supervised_user/test_support/kids_chrome_management_test_utils.h"
#include "net/http/http_status_code.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
namespace supervised_user {
namespace {
std::unique_ptr<net::test_server::HttpResponse> FromProtoData(
std::string_view data) { … }
kidsmanagement::ClassifyUrlResponse ClassifyUrlResponse(
kidsmanagement::ClassifyUrlResponse::DisplayClassification classification) { … }
}
void SetHttpEndpointsForKidsManagementApis(
base::test::ScopedFeatureList& feature_list,
std::string_view hostname) { … }
KidsManagementClassifyUrlMock::KidsManagementClassifyUrlMock() { … }
KidsManagementClassifyUrlMock::~KidsManagementClassifyUrlMock() = default;
void KidsManagementClassifyUrlMock::set_display_classification(
kidsmanagement::ClassifyUrlResponse::DisplayClassification classification) { … }
KidsManagementApiServerMock::KidsManagementApiServerMock() = default;
KidsManagementApiServerMock::~KidsManagementApiServerMock() = default;
void KidsManagementApiServerMock::InstallOn(
net::test_server::EmbeddedTestServer& test_server_) { … }
std::unique_ptr<net::test_server::HttpResponse>
KidsManagementApiServerMock::ListFamilyMembers(
const net::test_server::HttpRequest& request) { … }
std::unique_ptr<net::test_server::HttpResponse>
KidsManagementApiServerMock::ClassifyUrl(
const net::test_server::HttpRequest& request) { … }
base::CallbackListSubscription KidsManagementApiServerMock::Subscribe(
base::RepeatingCallback<RequestMonitor> monitor) { … }
void KidsManagementApiServerMock::RequestMonitorDispatcher(
const net::test_server::HttpRequest& request) { … }
void KidsManagementApiServerMock::AllowSubsequentClassifyUrl() { … }
void KidsManagementApiServerMock::RestrictSubsequentClassifyUrl() { … }
}