
Removes unused kNaClLoader (was PROCESS_TYPE_NACL_LOADER) from Windows as these are in fact Ppapi (PPAPI) sandbox types. Removes unused values from SandboxType enum and replaces default cases. SandboxType is not used for iteration so these boundary values are removed from the SandboxType enum. The kInvalid SandboxType is retained as it is used as an error case in a couple of places. It might be possible to remove this in the future. This removes default cases from switch statements where it might make sense to have a notification in future when new sandbox types are added. In these cases the default case is replaced with all otherwise unchecked cases, so retaining the existing behavior. Change-Id: I76ffc8ae617f3f8fa9aa68236551ebcfa4cce32f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1938076 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Will Harris <wfh@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Sergey Ulanov <sergeyu@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Alex Gough <ajgo@chromium.org> Cr-Commit-Position: refs/heads/master@{#723425}
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef CONTENT_BROWSER_SANDBOX_PARAMETERS_MAC_H_
|
|
#define CONTENT_BROWSER_SANDBOX_PARAMETERS_MAC_H_
|
|
|
|
#include "content/common/content_export.h"
|
|
#include "services/service_manager/sandbox/sandbox_type.h"
|
|
|
|
namespace base {
|
|
class CommandLine;
|
|
class FilePath;
|
|
}
|
|
|
|
namespace sandbox {
|
|
class SeatbeltExecClient;
|
|
}
|
|
|
|
namespace content {
|
|
|
|
// This populates the sandbox parameters in the client for the given
|
|
// |sandbox_type|. Some parameters may be extracted from the |command_line|.
|
|
CONTENT_EXPORT void SetupSandboxParameters(
|
|
service_manager::SandboxType sandbox_type,
|
|
const base::CommandLine& command_line,
|
|
sandbox::SeatbeltExecClient* client);
|
|
|
|
// Expands the SandboxType::kNetwork policy to allow reading files from
|
|
// the specified |path|, which stores TLS certificates used by the browser
|
|
// test web servers.
|
|
CONTENT_EXPORT void SetNetworkTestCertsDirectoryForTesting(
|
|
const base::FilePath& path);
|
|
|
|
} // namespace content
|
|
|
|
#endif // CONTENT_BROWSER_SANDBOX_PARAMETERS_MAC_H_
|