chromium/third_party/blink/renderer/modules/media_capabilities/media_capabilities_identifiability_metrics.cc

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

#include "third_party/blink/renderer/modules/media_capabilities/media_capabilities_identifiability_metrics.h"

#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_audio_configuration.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_key_system_track_configuration.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_capabilities_decoding_info.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_capabilities_key_system_configuration.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_decoding_configuration.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_key_system_access.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_key_system_configuration.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_key_system_media_capability.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_video_configuration.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/encryptedmedia/media_key_system_access.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"

namespace blink {
namespace media_capabilities_identifiability_metrics {
namespace {

bool IsDecodingInfoTypeAllowed() {}

bool ShouldSampleDecodingInfoType() {}

void RecordDecodingIdentifiabilityMetric(ExecutionContext* context,
                                         IdentifiableToken input_token,
                                         IdentifiableToken output_token) {}

// The various ComputeToken methods create digests of each of the objects,
// returning the special empty value when an input is nullptr.
IdentifiableToken ComputeToken(const VideoConfiguration* configuration) {}

IdentifiableToken ComputeToken(const AudioConfiguration* configuration) {}

IdentifiableToken ComputeToken(
    const KeySystemTrackConfiguration* configuration) {}

IdentifiableToken ComputeToken(
    const MediaKeySystemMediaCapability* capability) {}

IdentifiableToken ComputeToken(
    const MediaKeySystemConfiguration* configuration) {}

IdentifiableToken ComputeToken(const MediaKeySystemAccess* access) {}

IdentifiableToken ComputeToken(
    const MediaCapabilitiesKeySystemConfiguration* configuration) {}

IdentifiableToken ComputeToken(
    const MediaDecodingConfiguration* configuration) {}

IdentifiableToken ComputeToken(const MediaCapabilitiesDecodingInfo* info) {}

}  // namespace

void ReportDecodingInfoResult(ExecutionContext* context,
                              const MediaDecodingConfiguration* input,
                              const MediaCapabilitiesDecodingInfo* output) {}

void ReportDecodingInfoResult(ExecutionContext* context,
                              std::optional<IdentifiableToken> input_token,
                              const MediaCapabilitiesDecodingInfo* output) {}

std::optional<IdentifiableToken> ComputeDecodingInfoInputToken(
    const MediaDecodingConfiguration* input) {}

}  // namespace media_capabilities_identifiability_metrics
}  // namespace blink