chromium/content/browser/media/cdm_file_impl.cc

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

#include "content/browser/media/cdm_file_impl.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/string_util.h"
#include "content/browser/media/cdm_storage_manager.h"
#include "content/browser/media/media_license_storage_host.h"
#include "media/cdm/cdm_helpers.h"
#include "media/cdm/cdm_type.h"
#include "media/mojo/mojom/cdm_storage.mojom.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "storage/browser/quota/quota_manager.h"
#include "storage/common/file_system/file_system_types.h"

namespace content {

namespace {

// The CDM interface has a restriction that file names can not begin with _,
// so use it to prefix temporary files.
const char kTemporaryFilePrefix =;

// Maximum length of a file name.
const size_t kFileNameMaxLength =;

// UMA suffices for CDM File IO operations.
const char kReadFile[] =;
const char kWriteFile[] =;
const char kDeleteFile[] =;

}  // namespace

// static
bool CdmFileImpl::IsValidName(const std::string& name) {}

CdmFileImpl::CdmFileImpl(
    MediaLicenseStorageHost* host,
    const media::CdmType& cdm_type,
    const std::string& file_name,
    mojo::PendingAssociatedReceiver<media::mojom::CdmFile> pending_receiver)
    :{}

CdmFileImpl::CdmFileImpl(
    CdmStorageManager* manager,
    const blink::StorageKey& storage_key,
    const media::CdmType& cdm_type,
    const std::string& file_name,
    mojo::PendingAssociatedReceiver<media::mojom::CdmFile> pending_receiver)
    :{}

CdmFileImpl::~CdmFileImpl() {}

void CdmFileImpl::Read(ReadCallback callback) {}

void CdmFileImpl::DidRead(std::optional<std::vector<uint8_t>> data) {}

void CdmFileImpl::Write(const std::vector<uint8_t>& data,
                        WriteCallback callback) {}

void CdmFileImpl::ReportFileOperationUMA(bool success,
                                         const std::string& operation) {}

void CdmFileImpl::DidWrite(bool success) {}

void CdmFileImpl::DeleteFile() {}

void CdmFileImpl::DidDeleteFile(bool success) {}

void CdmFileImpl::OnReceiverDisconnect() {}

}  // namespace content