chromium/chrome/browser/enterprise/data_protection/paste_allowed_request.cc

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

#include "chrome/browser/enterprise/data_protection/paste_allowed_request.h"

#include "chrome/browser/enterprise/data_protection/data_protection_clipboard_utils.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/render_frame_host.h"

namespace enterprise_data_protection {

namespace {

PasteAllowedRequest::RequestsMap& RequestsMapStorage() {}

// Completion callback of `StartPasteAllowedRequest()`. Sets the allowed
// status for the clipboard data corresponding to sequence number `seqno`.
void FinishPasteIfAllowed(
    const content::GlobalRenderFrameHostId& rfh_id,
    const ui::ClipboardSequenceNumberToken& seqno,
    std::optional<content::ClipboardPasteData> clipboard_paste_data) {}

}  // namespace

// The amount of time that the result of a content allow request is cached
// and reused for the same clipboard `seqno`.
// TODO(b/294844565): Update this once multi-format pastes are handled
// correctly.
constexpr base::TimeDelta PasteAllowedRequest::kIsPasteAllowedRequestTooOld =;

// static
void PasteAllowedRequest::StartPasteAllowedRequest(
    const content::ClipboardEndpoint& source,
    const content::ClipboardEndpoint& destination,
    const content::ClipboardMetadata& metadata,
    content::ClipboardPasteData clipboard_paste_data,
    IsClipboardPasteAllowedCallback callback) {}

// static
void PasteAllowedRequest::CleanupObsoleteRequests() {}

// static
void PasteAllowedRequest::CleanupRequestsForTesting() {}

// static
void PasteAllowedRequest::AddRequestToCacheForTesting(
    content::GlobalRenderFrameHostId rfh_id,
    ui::ClipboardSequenceNumberToken seqno,
    PasteAllowedRequest request) {}

// static
size_t PasteAllowedRequest::requests_count_for_testing() {}

PasteAllowedRequest::PasteAllowedRequest() = default;
PasteAllowedRequest::PasteAllowedRequest(PasteAllowedRequest&&) = default;
PasteAllowedRequest& PasteAllowedRequest::operator=(PasteAllowedRequest&&) =
    default;
PasteAllowedRequest::~PasteAllowedRequest() = default;

bool PasteAllowedRequest::AddCallback(
    IsClipboardPasteAllowedCallback callback) {}

void PasteAllowedRequest::AddData(content::ClipboardPasteData data) {}

void PasteAllowedRequest::InvokeCallback(
    content::ClipboardPasteData data,
    IsClipboardPasteAllowedCallback callback) {}

void PasteAllowedRequest::Complete(
    std::optional<content::ClipboardPasteData> data) {}

bool PasteAllowedRequest::IsObsolete(base::Time now) {}

base::Time PasteAllowedRequest::completed_time() const {}

void PasteAllowedRequest::InvokeCallbacks() {}

}  // namespace enterprise_data_protection