chromium/content/browser/media/cdm_storage_common.h

// 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.

#ifndef CONTENT_BROWSER_MEDIA_CDM_STORAGE_COMMON_H_
#define CONTENT_BROWSER_MEDIA_CDM_STORAGE_COMMON_H_

#include <stdint.h>

#include <string>
#include <vector>

#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "content/common/content_export.h"
#include "media/cdm/cdm_type.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"

namespace content {

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class CdmStorageOpenError {};

// The file name of the database storing cdm storage data.
const base::FilePath::CharType kCdmStorageDatabaseFileName[] =);

// CdmStorage provides per-storage key, per-CDM type storage.
struct CONTENT_EXPORT CdmStorageBindingContext {};

// A CDM file for a given storage key can be uniquely identified by its name
// and CDM type.
struct CONTENT_EXPORT CdmFileId {};

// As above.
// Only used in the CdmStorage implementation, remove `Two` from name once
// MediaLicense* code is removed.
struct CONTENT_EXPORT CdmFileIdTwo {};

struct CONTENT_EXPORT CdmFileIdAndContents {};

// Called in CdmStorageDatabase and CdmStorageManager to get
// CdmStorageManager* metric names.
std::string GetCdmStorageManagerHistogramName(const std::string& operation,
                                              bool in_memory);

}  // namespace content

#endif  // CONTENT_BROWSER_MEDIA_CDM_STORAGE_COMMON_H_