Skip to content

Commit

Permalink
PpapiPermissions are not used by the sandbox delegate
Browse files Browse the repository at this point in the history
ppapi::PpapiPermissions are not used by the delegate and it is
unlikely that they will be used in future. The parameter can be
removed.

Bug: 1270309
Tests: content_unittests --gtest_filter=PpapiPluginSandboxSettings*
Change-Id: Ib3173a314bdec9fb158850b361b433c2305a3432
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3553188
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987291}
  • Loading branch information
quidity authored and Chromium LUCI CQ committed Mar 31, 2022
1 parent 9af44c7 commit ee0b28c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 22 deletions.
3 changes: 1 addition & 2 deletions content/browser/ppapi_plugin_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ bool PpapiPluginProcessHost::Init(const PepperPluginInfo& info) {
// having a plugin launcher means we need to use another process instead of
// just forking the zygote.
process_->Launch(
std::make_unique<PpapiPluginSandboxedProcessLauncherDelegate>(
permissions_),
std::make_unique<PpapiPluginSandboxedProcessLauncherDelegate>(),
std::move(cmd_line), true);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
#endif

namespace content {

PpapiPluginSandboxedProcessLauncherDelegate::
PpapiPluginSandboxedProcessLauncherDelegate(
const ppapi::PpapiPermissions& permissions)
#if BUILDFLAG(IS_WIN)
: permissions_(permissions)
#endif
{
}

#if BUILDFLAG(IS_WIN)
bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget(
sandbox::TargetPolicy* policy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "content/public/common/zygote/zygote_buildflags.h"
#include "ppapi/shared_impl/ppapi_permissions.h"

#if BUILDFLAG(USE_ZYGOTE_HANDLE)
#include "content/public/common/zygote/zygote_handle.h" // nogncheck
Expand All @@ -20,8 +19,7 @@ namespace content {
class CONTENT_EXPORT PpapiPluginSandboxedProcessLauncherDelegate
: public content::SandboxedProcessLauncherDelegate {
public:
explicit PpapiPluginSandboxedProcessLauncherDelegate(
const ppapi::PpapiPermissions& permissions);
PpapiPluginSandboxedProcessLauncherDelegate() = default;

PpapiPluginSandboxedProcessLauncherDelegate(
const PpapiPluginSandboxedProcessLauncherDelegate&) = delete;
Expand All @@ -44,11 +42,6 @@ class CONTENT_EXPORT PpapiPluginSandboxedProcessLauncherDelegate
bool DisclaimResponsibility() override;
bool EnableCpuSecurityMitigations() override;
#endif

private:
#if BUILDFLAG(IS_WIN)
const ppapi::PpapiPermissions permissions_;
#endif
};
} // namespace content

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ TEST_P(PpapiPluginFeatureSandboxWinTest, PpapiGeneratedPolicyTest) {
::sandbox::SandboxFactory::GetBrokerServices();
auto policy = broker->CreatePolicy();

ppapi::PpapiPermissions permissions(ppapi::Permission::PERMISSION_NONE);
PpapiPluginSandboxedProcessLauncherDelegate test_ppapi_delegate(permissions);
PpapiPluginSandboxedProcessLauncherDelegate test_ppapi_delegate;

// PreSpawn
::sandbox::ResultCode result =
Expand Down

0 comments on commit ee0b28c

Please sign in to comment.