#include "third_party/blink/renderer/platform/media/new_session_cdm_result_promise.h"
#include "base/containers/contains.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/media/cdm_result_promise_helper.h"
namespace blink {
namespace {
const char kTimeToResolveUmaPrefix[] = …;
const char kTimeToRejectUmaPrefix[] = …;
CdmResultForUMA ConvertStatusToUMAResult(SessionInitStatus status) { … }
}
static WebContentDecryptionModuleResult::SessionStatus ConvertStatus(
SessionInitStatus status) { … }
NewSessionCdmResultPromise::NewSessionCdmResultPromise(
const WebContentDecryptionModuleResult& result,
const std::string& key_system_uma_prefix,
const std::string& uma_name,
SessionInitializedCB new_session_created_cb,
const std::vector<SessionInitStatus>& expected_statuses)
: … { … }
NewSessionCdmResultPromise::~NewSessionCdmResultPromise() { … }
void NewSessionCdmResultPromise::resolve(const std::string& session_id) { … }
void NewSessionCdmResultPromise::reject(CdmPromise::Exception exception_code,
uint32_t system_code,
const std::string& error_message) { … }
}