#include "components/supervised_user/core/browser/remote_web_approvals_manager.h"
#include <string>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/values.h"
#include "components/supervised_user/core/browser/permission_request_creator.h"
#include "components/supervised_user/core/browser/supervised_user_utils.h"
#include "components/supervised_user/core/common/supervised_user_constants.h"
#include "url/gurl.h"
namespace {
void CreateURLAccessRequest(
const GURL& url,
supervised_user::PermissionRequestCreator* creator,
supervised_user::RemoteWebApprovalsManager::ApprovalRequestInitiatedCallback
callback) { … }
}
namespace supervised_user {
RemoteWebApprovalsManager::RemoteWebApprovalsManager() = default;
RemoteWebApprovalsManager::~RemoteWebApprovalsManager() = default;
void RemoteWebApprovalsManager::RequestApproval(
const GURL& url,
const UrlFormatter& url_formatter,
ApprovalRequestInitiatedCallback callback) { … }
bool RemoteWebApprovalsManager::AreApprovalRequestsEnabled() const { … }
void RemoteWebApprovalsManager::AddApprovalRequestCreator(
std::unique_ptr<PermissionRequestCreator> creator) { … }
void RemoteWebApprovalsManager::ClearApprovalRequestsCreators() { … }
size_t RemoteWebApprovalsManager::FindEnabledRemoteApprovalRequestCreator(
size_t start) const { … }
void RemoteWebApprovalsManager::AddApprovalRequestInternal(
const CreateApprovalRequestCallback& create_request,
ApprovalRequestInitiatedCallback callback,
size_t index) { … }
void RemoteWebApprovalsManager::OnApprovalRequestIssued(
const CreateApprovalRequestCallback& create_request,
ApprovalRequestInitiatedCallback callback,
size_t index,
bool success) { … }
}