chromium/components/supervised_user/test_support/kids_management_api_server_mock.cc

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

#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) {}
}  // namespace

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_) {}

// Return a default Simpson family.
std::unique_ptr<net::test_server::HttpResponse>
KidsManagementApiServerMock::ListFamilyMembers(
    const net::test_server::HttpRequest& request) {}

// Allow urls according to queue of classifications.
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() {}

}  // namespace supervised_user