chromium/components/supervised_user/core/browser/permission_request_creator_impl.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/core/browser/permission_request_creator_impl.h"

#include <memory>
#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.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"

namespace supervised_user {

namespace {
void DispatchResult(bool success,
                    PermissionRequestCreator::SuccessCallback callback) {}

// TODO(b/4598236): Remove the validation and handle invalid responses
// in proto_fetcher (using a DataError status).
bool ValidateResponse(
    const kidsmanagement::CreatePermissionRequestResponse& response) {}

void OnSuccess(const kidsmanagement::CreatePermissionRequestResponse& response,
               PermissionRequestCreator::SuccessCallback callback) {}

void OnFailure(const ProtoFetcherStatus& error,
               PermissionRequestCreator::SuccessCallback callback) {}

void OnResponse(
    PermissionRequestCreator::SuccessCallback callback,
    const ProtoFetcherStatus& status,
    std::unique_ptr<kidsmanagement::CreatePermissionRequestResponse> response) {}

// Flips order of arguments so that the sole unbound argument will be the
// request.
std::unique_ptr<ProtoFetcher<kidsmanagement::CreatePermissionRequestResponse>>
FetcherFactory(
    signin::IdentityManager* identity_manager,
    scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
    const FetcherConfig& config,
    const kidsmanagement::PermissionRequest& request) {}

}  // namespace

PermissionRequestCreatorImpl::PermissionRequestCreatorImpl(
    signin::IdentityManager* identity_manager,
    scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory)
    :{}

PermissionRequestCreatorImpl::~PermissionRequestCreatorImpl() = default;

bool PermissionRequestCreatorImpl::IsEnabled() const {}

void PermissionRequestCreatorImpl::CreateURLAccessRequest(
    const GURL& url_requested,
    SuccessCallback callback) {}

}  // namespace supervised_user