-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a safe-mode for the VideoCapture Service
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}
- Loading branch information
Showing
16 changed files
with
120 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 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_ |
Oops, something went wrong.