Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc

Issue 456513002: Add base:: qualification to some CommandLine references in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: imerge Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/sandbox_linux/sandbox_linux.cc ('k') | content/common/sandbox_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
diff --git a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
index ae856ee7140136caf6454bd03fc4feae87c549e8..c9fda1d65cda05489aef8df6b121d646b4873fb2 100644
--- a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
+++ b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
@@ -158,7 +158,8 @@ void StartSandboxWithPolicy(sandbox::SandboxBPFPolicy* policy) {
// in its dependencies. Make sure to not link things that are not needed.
#if !defined(IN_NACL_HELPER)
scoped_ptr<SandboxBPFBasePolicy> GetGpuProcessSandbox() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
bool allow_sysv_shm = false;
if (command_line.HasSwitch(switches::kGpuSandboxAllowSysVShm)) {
DCHECK(IsArchitectureArm());
@@ -174,7 +175,7 @@ scoped_ptr<SandboxBPFBasePolicy> GetGpuProcessSandbox() {
}
// Initialize the seccomp-bpf sandbox.
-bool StartBPFSandbox(const CommandLine& command_line,
+bool StartBPFSandbox(const base::CommandLine& command_line,
const std::string& process_type) {
scoped_ptr<SandboxBPFBasePolicy> policy;
@@ -199,7 +200,7 @@ bool StartBPFSandbox(const CommandLine& command_line,
return true;
}
#else // defined(IN_NACL_HELPER)
-bool StartBPFSandbox(const CommandLine& command_line,
+bool StartBPFSandbox(const base::CommandLine& command_line,
const std::string& process_type) {
NOTREACHED();
// Avoid -Wunused-function with no-op code.
@@ -216,7 +217,8 @@ bool StartBPFSandbox(const CommandLine& command_line,
// Is seccomp BPF globally enabled?
bool SandboxSeccompBPF::IsSeccompBPFDesired() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
if (!command_line.HasSwitch(switches::kNoSandbox) &&
!command_line.HasSwitch(switches::kDisableSeccompFilterSandbox)) {
return true;
@@ -228,7 +230,8 @@ bool SandboxSeccompBPF::IsSeccompBPFDesired() {
bool SandboxSeccompBPF::ShouldEnableSeccompBPF(
const std::string& process_type) {
#if defined(USE_SECCOMP_BPF)
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
if (process_type == switches::kGpuProcess)
return !command_line.HasSwitch(switches::kDisableGpuSandbox);
@@ -256,7 +259,8 @@ bool SandboxSeccompBPF::SupportsSandbox() {
bool SandboxSeccompBPF::StartSandbox(const std::string& process_type) {
#if defined(USE_SECCOMP_BPF)
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
if (IsSeccompBPFDesired() && // Global switches policy.
ShouldEnableSeccompBPF(process_type) && // Process-specific policy.
« no previous file with comments | « content/common/sandbox_linux/sandbox_linux.cc ('k') | content/common/sandbox_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698