chromium/media/base/key_systems.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 "media/base/key_systems.h"

#include <optional>
#include <string>

#include "media/cdm/clear_key_cdm_common.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h"

namespace media {

namespace {
// These names are used by UMA. Do not change them!
const char kClearKeyKeySystemNameForUMA[] =;
const char kUnknownKeySystemNameForUMA[] =;
const char kHardwareSecureForUMA[] =;
const char kSoftwareSecureForUMA[] =;

enum KeySystemForUkm {};
}  // namespace

// Returns a name for `key_system` for UMA logging. When `use_hw_secure_codecs`
// is specified (non-nullopt), names with robustness will be returned for
// supported key systems.
std::string GetKeySystemNameForUMA(const std::string& key_system,
                                   std::optional<bool> use_hw_secure_codecs) {}

// Returns an int mapping to `key_system` suitable for UKM reporting. CdmConfig
// is not needed here because we can report CdmConfig fields in UKM directly.
MEDIA_EXPORT int GetKeySystemIntForUKM(const std::string& key_system) {}

}  // namespace media