chromium/media/mojo/services/mojo_cdm_file_io.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/mojo/services/mojo_cdm_file_io.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/metrics/histogram_macros.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "media/cdm/cdm_helpers.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"

namespace media {

namespace {

ClientStatus;
FileStatus;
StorageStatus;

// Constants for UMA reporting of file size (in KB) via
// UMA_HISTOGRAM_CUSTOM_COUNTS. Note that the histogram is log-scaled (rather
// than linear).
constexpr int kSizeKBMin =;
const int64_t kMaxFileSizeKB =;
constexpr int kSizeKBBuckets =;

const char* ConvertStorageStatus(StorageStatus status) {}

const char* ConvertFileStatus(FileStatus status) {}

}  // namespace

MojoCdmFileIO::MojoCdmFileIO(Delegate* delegate,
                             cdm::FileIOClient* client,
                             mojo::Remote<mojom::CdmStorage> cdm_storage)
    :{}

MojoCdmFileIO::~MojoCdmFileIO() {}

void MojoCdmFileIO::Open(const char* file_name, uint32_t file_name_size) {}

void MojoCdmFileIO::OnFileOpened(
    StorageStatus status,
    mojo::PendingAssociatedRemote<mojom::CdmFile> cdm_file) {}

void MojoCdmFileIO::Read() {}

void MojoCdmFileIO::OnFileRead(FileStatus status,
                               const std::vector<uint8_t>& data) {}

void MojoCdmFileIO::Write(const uint8_t* data, uint32_t data_size) {}

void MojoCdmFileIO::OnFileWritten(FileStatus status) {}

void MojoCdmFileIO::Close() {}

void MojoCdmFileIO::OnError(ErrorType error) {}

void MojoCdmFileIO::NotifyClientOfError(ErrorType error) {}

}  // namespace media