#include "components/supervised_user/core/browser/kids_chrome_management_url_checker_client.h"
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/scoped_refptr.h"
#include "base/version_info/channel.h"
#include "components/safe_search_api/url_checker_client.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/supervised_user/core/browser/fetcher_config.h"
#include "components/supervised_user/core/browser/kids_management_api_fetcher.h"
#include "components/supervised_user/core/browser/proto/kidsmanagement_messages.pb.h"
#include "components/supervised_user/core/common/features.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "third_party/protobuf/src/google/protobuf/message_lite.h"
#include "url/gurl.h"
namespace supervised_user {
namespace {
ClassifyUrlResponse;
safe_search_api::ClientClassification ToSafeSearchClientClassification(
ClassifyUrlResponse* classify_url_response) { … }
void OnResponse(
const GURL& url,
safe_search_api::URLCheckerClient::ClientCheckCallback client_callback,
const ProtoFetcherStatus& status,
std::unique_ptr<kidsmanagement::ClassifyUrlResponse>
classify_url_response) { … }
std::unique_ptr<ProtoFetcher<kidsmanagement::ClassifyUrlResponse>> ClassifyURL(
signin::IdentityManager* identity_manager,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
const FetcherConfig& config,
version_info::Channel channel,
const kidsmanagement::ClassifyUrlRequest& request) { … }
FetcherConfig GetFetcherConfig() { … }
}
KidsChromeManagementURLCheckerClient::KidsChromeManagementURLCheckerClient(
signin::IdentityManager* identity_manager,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
std::string_view country,
version_info::Channel channel)
: … { … }
KidsChromeManagementURLCheckerClient::~KidsChromeManagementURLCheckerClient() =
default;
void KidsChromeManagementURLCheckerClient::CheckURL(
const GURL& url,
safe_search_api::URLCheckerClient::ClientCheckCallback callback) { … }
}