A recent change in Chromium is avoiding passing `PermissionRequestData` as a unique_ptr around, and actually just as a ref where no mutate is required. Chromium changes: https://chromium.googlesource.com/chromium/src/+/173060c862de19ba0660a29697a1614782cd8c43 commit 173060c862de19ba0660a29697a1614782cd8c43 Author: Chris Fredrickson <cfredric@chromium.org> Date: Wed May 14 07:23:01 2025 -0700 Avoid references to unique_ptrs in permissions API A function that takes a reference does not typically care whether or not the referent is allocated on the heap. So, the use of `const std::unique_ptr<T>&` in the public API is unnecessary and overly restrictive. (E.g., GeolocationPermissionContextDelegateAndroid can now avoid an unnecessary heap allocation.) Additionally, the const keyword only promises that the unique_ptr itself is const; the referent might still be mutated. This is usually not the desired behavior when using references, so this type is somewhat misleading. (`const std::unique_ptr<const T>` would have to be used instead, in order to get familiar "immutable argument" semantics.) For both of those reasons, it is better to use a normal `const PermissionRequestData&` instead of `const std::unique_ptr<PermissionRequestData>&` in the public API. Change-Id: Iae1228a7bf17f9de77a86e2e9c44592e6a418645 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6532217 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by: Florian Jacky <fjacky@chromium.org> Commit-Queue: Chris Fredrickson <cfredric@chromium.org> Auto-Submit: Chris Fredrickson <cfredric@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/main@{#1460064}
Widevine in Brave
Widevine is used to decrypt DRM-protected content, which is served from streaming services such as Netflix. Widevine is integrated in Chromium as a component.
Signature files (brave.exe.sig, chrome.dll.sig, ...)
Streaming services only offer high definition content to clients that are trusted. Widevine has mechanisms to ensure the integrity of the client. One of these mechanisms are .sig files. They prove to Widevine that the browser has not been tampered with. In order for Brave's users to see high-definition content, the browser must generate and ship with those .sig files.
Licensing
Brave's licensing agreement for Widevine forbids distribution of Widevine's binaries. This entails several workarounds, some of which are listed below.
Workarounds
Sequential component updates: SequentialUpdateChecker
Brave has its own components and thus uses its own component update server. This
server also gets polled by the browser for Widevine. To comply with the
licensing restriction described above, Brave's component update server responds
with a redirect to Google's server in this case. This works as long as a single
update check request only polls for Widevine, and not also for any other
components. We have a special class, SequentialUpdateChecker, that makes sure
that this is the case.