#include "content/public/browser/media_device_id.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/task/sequenced_task_runner.h"
#include "content/browser/media/media_devices_util.h"
#include "content/public/browser/browser_thread.h"
#include "media/audio/audio_device_description.h"
#include "third_party/blink/public/common/mediastream/media_device_id.h"
namespace content {
std::string GetHMACForMediaDeviceID(const std::string& salt,
const url::Origin& security_origin,
const std::string& raw_unique_id) { … }
bool DoesMediaDeviceIDMatchHMAC(const std::string& salt,
const url::Origin& security_origin,
const std::string& device_guid,
const std::string& raw_unique_id) { … }
void GetMediaDeviceIDForHMAC(
blink::mojom::MediaStreamType stream_type,
std::string salt,
url::Origin security_origin,
std::string hmac_device_id,
scoped_refptr<base::SequencedTaskRunner> task_runner,
base::OnceCallback<void(const std::optional<std::string>&)> callback) { … }
bool IsValidDeviceId(const std::string& device_id) { … }
}