
On macOS, this disables loading 3rd-party DAL plugins, which may crash upon use. This relies on the hardened runtime from signed binaries. When the CHILD_PLUGIN option is passed, the runtime is disabled and 3rd-party DAL plugins are allowed. For developers convenience who cannot sign their binaries, an environment variable was identified within the the macOS libraries to achieve a similar effect and skip loading all DAL plugins. This is enabled by the RetryGetVideoCaptureDeviceInfos feature which is also updated accordingly. The feature can now handle a service crash properly and is compiled on all platforms, though only macOS will have at most one retry. On the second attempt, the VideoCaptureService safe-mode will be enabled. Traces of the old RetryCount are removed since the value is unused. Bug: 990381 Change-Id: If042b19006ef4166260941af5485897f65e5e0de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209899 Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Commit-Queue: Florent Castelli <orphis@chromium.org> Reviewed-by: Alexander Alekseev <alemate@chromium.org> Reviewed-by: Tony Herre <toprice@chromium.org> Reviewed-by: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/main@{#1103243}
21 lines
690 B
C++
21 lines
690 B
C++
// Copyright 2023 The Chromium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef CONTENT_BROWSER_VIDEO_CAPTURE_SERVICE_IMPL_H_
|
|
#define CONTENT_BROWSER_VIDEO_CAPTURE_SERVICE_IMPL_H_
|
|
|
|
#include "content/common/content_export.h"
|
|
#include "services/video_capture/public/mojom/video_capture_service.mojom-forward.h"
|
|
|
|
namespace content {
|
|
|
|
// Enables a safe-mode VideoCaptureService.
|
|
// On macOS, this disables 3rd-party DAL plugins from being loaded.
|
|
// It currently has no effect on other platforms.
|
|
void EnableVideoCaptureServiceSafeMode();
|
|
|
|
} // namespace content
|
|
|
|
#endif // CONTENT_BROWSER_VIDEO_CAPTURE_SERVICE_IMPL_H_
|