summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
Diffstat (limited to 'content/common')
-rw-r--r--content/common/child_process_host_impl.cc2
-rw-r--r--content/common/content_switches_internal.cc3
-rw-r--r--content/common/gpu/client/gl_helper_benchmark.cc2
-rw-r--r--content/common/gpu/client/gl_helper_unittest.cc2
-rw-r--r--content/common/gpu/gpu_channel.cc3
-rw-r--r--content/common/gpu/gpu_memory_manager.cc4
-rw-r--r--content/common/gpu/image_transport_surface_android.cc3
-rw-r--r--content/common/gpu/media/android_video_encode_accelerator.cc2
-rw-r--r--content/common/gpu/media/gpu_video_encode_accelerator.cc2
-rw-r--r--content/common/gpu/media/rendering_helper.cc2
-rw-r--r--content/common/gpu/media/v4l2_video_encode_accelerator.cc2
-rw-r--r--content/common/gpu/media/vaapi_h264_decoder_unittest.cc8
-rw-r--r--content/common/gpu/media/vaapi_video_encode_accelerator.cc2
-rw-r--r--content/common/gpu/media/video_decode_accelerator_unittest.cc6
-rw-r--r--content/common/gpu/media/video_encode_accelerator_unittest.cc8
-rw-r--r--content/common/gpu/texture_image_transport_surface.cc3
-rw-r--r--content/common/handle_enumerator_win.cc2
-rw-r--r--content/common/pepper_plugin_list.cc5
-rw-r--r--content/common/plugin_list.cc2
-rw-r--r--content/common/sandbox_init_mac.cc3
-rw-r--r--content/common/sandbox_init_win.cc3
-rw-r--r--content/common/sandbox_linux/bpf_gpu_policy_linux.cc16
-rw-r--r--content/common/sandbox_linux/sandbox_linux.cc7
-rw-r--r--content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc16
-rw-r--r--content/common/sandbox_mac.mm3
-rw-r--r--content/common/sandbox_win.cc17
26 files changed, 73 insertions, 55 deletions
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 6fa0199..c4d209e 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -93,7 +93,7 @@ ChildProcessHost* ChildProcessHost::Create(ChildProcessHostDelegate* delegate) {
base::FilePath ChildProcessHost::GetChildPath(int flags) {
base::FilePath child_path;
- child_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath(
+ child_path = base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
switches::kBrowserSubprocessPath);
#if defined(OS_LINUX)
diff --git a/content/common/content_switches_internal.cc b/content/common/content_switches_internal.cc
index 2f0638f..76d8772 100644
--- a/content/common/content_switches_internal.cc
+++ b/content/common/content_switches_internal.cc
@@ -14,7 +14,8 @@
namespace content {
bool IsPinchToZoomEnabled() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
// --disable-pinch should always disable pinch
if (command_line.HasSwitch(switches::kDisablePinch))
diff --git a/content/common/gpu/client/gl_helper_benchmark.cc b/content/common/gpu/client/gl_helper_benchmark.cc
index fc41fed..225db42 100644
--- a/content/common/gpu/client/gl_helper_benchmark.cc
+++ b/content/common/gpu/client/gl_helper_benchmark.cc
@@ -296,7 +296,7 @@ TEST_F(GLHelperTest, DISABLED_ScaleTestImage) {
// These tests needs to run against a proper GL environment, so we
// need to set it up before we can run the tests.
int main(int argc, char** argv) {
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
base::TestSuite* suite = new content::ContentTestSuite(argc, argv);
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool pool;
diff --git a/content/common/gpu/client/gl_helper_unittest.cc b/content/common/gpu/client/gl_helper_unittest.cc
index f2a148e..e22c3f7 100644
--- a/content/common/gpu/client/gl_helper_unittest.cc
+++ b/content/common/gpu/client/gl_helper_unittest.cc
@@ -1698,7 +1698,7 @@ TEST_F(GLHelperTest, CheckOptimizations) {
// These tests needs to run against a proper GL environment, so we
// need to set it up before we can run the tests.
int main(int argc, char** argv) {
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
base::TestSuite* suite = new content::ContentTestSuite(argc, argv);
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool pool;
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 330e3cf..0759e5d 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -417,7 +417,8 @@ GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
DCHECK(client_id);
channel_id_ = IPC::Channel::GenerateVerifiedChannelID("gpu");
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages);
}
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 9a23375..045210a 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -62,11 +62,11 @@ GpuMemoryManager::~GpuMemoryManager() {
void GpuMemoryManager::UpdateAvailableGpuMemory() {
// If the value was overridden on the command line, use the specified value.
static bool client_hard_limit_bytes_overridden =
- CommandLine::ForCurrentProcess()->HasSwitch(
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kForceGpuMemAvailableMb);
if (client_hard_limit_bytes_overridden) {
base::StringToUint64(
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kForceGpuMemAvailableMb),
&client_hard_limit_bytes_);
client_hard_limit_bytes_ *= 1024 * 1024;
diff --git a/content/common/gpu/image_transport_surface_android.cc b/content/common/gpu/image_transport_surface_android.cc
index 5fc9e51..5e0d6ff 100644
--- a/content/common/gpu/image_transport_surface_android.cc
+++ b/content/common/gpu/image_transport_surface_android.cc
@@ -92,7 +92,8 @@ bool ImageTransportSurfaceAndroid::Initialize() {
GpuChannel* parent_channel =
GetHelper()->manager()->LookupChannel(parent_client_id_);
if (parent_channel) {
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess))
GetHelper()->SetPreemptByFlag(parent_channel->GetPreemptionFlag());
}
diff --git a/content/common/gpu/media/android_video_encode_accelerator.cc b/content/common/gpu/media/android_video_encode_accelerator.cc
index 83593fa..a6406c1 100644
--- a/content/common/gpu/media/android_video_encode_accelerator.cc
+++ b/content/common/gpu/media/android_video_encode_accelerator.cc
@@ -86,7 +86,7 @@ AndroidVideoEncodeAccelerator::GetSupportedProfiles() {
std::vector<SupportedProfile> profiles;
#if defined(ENABLE_WEBRTC)
- const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
return profiles;
#endif
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
index 52ecab8..8c12967 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
@@ -191,7 +191,7 @@ void GpuVideoEncodeAccelerator::CreateEncoder() {
encoder_.reset(new V4L2VideoEncodeAccelerator(device.Pass()));
#elif defined(ARCH_CPU_X86_FAMILY)
- const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (cmd_line->HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode))
encoder_.reset(new VaapiVideoEncodeAccelerator(gfx::GetXDisplay()));
#endif
diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc
index 3abc30e..7ee9401 100644
--- a/content/common/gpu/media/rendering_helper.cc
+++ b/content/common/gpu/media/rendering_helper.cc
@@ -62,7 +62,7 @@ RenderingHelperParams::~RenderingHelperParams() {}
// static
bool RenderingHelper::InitializeOneOff() {
- CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
#if GL_VARIANT_GLX
cmd_line->AppendSwitchASCII(switches::kUseGL,
gfx::kGLImplementationDesktopName);
diff --git a/content/common/gpu/media/v4l2_video_encode_accelerator.cc b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
index a5cb4fb..b3967ea 100644
--- a/content/common/gpu/media/v4l2_video_encode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
@@ -286,7 +286,7 @@ V4L2VideoEncodeAccelerator::GetSupportedProfiles() {
std::vector<SupportedProfile> profiles;
SupportedProfile profile;
- const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (cmd_line->HasSwitch(switches::kEnableWebRtcHWVp8Encoding)) {
profile.profile = media::VP8PROFILE_MAIN;
profile.max_resolution.SetSize(1920, 1088);
diff --git a/content/common/gpu/media/vaapi_h264_decoder_unittest.cc b/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
index b14c50b..9c7822b 100644
--- a/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
+++ b/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
@@ -350,7 +350,7 @@ TEST(VaapiH264DecoderTest, TestDecode) {
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args.
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
// Needed to enable DVLOG through --vmodule.
logging::LoggingSettings settings;
@@ -358,11 +358,11 @@ int main(int argc, char** argv) {
CHECK(logging::InitLogging(settings));
// Process command line.
- CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
CHECK(cmd_line);
- CommandLine::SwitchMap switches = cmd_line->GetSwitches();
- for (CommandLine::SwitchMap::const_iterator it = switches.begin();
+ base::CommandLine::SwitchMap switches = cmd_line->GetSwitches();
+ for (base::CommandLine::SwitchMap::const_iterator it = switches.begin();
it != switches.end();
++it) {
if (it->first == "input_file") {
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
index fa45ca9..32f9f4f 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -109,7 +109,7 @@ std::vector<media::VideoEncodeAccelerator::SupportedProfile>
VaapiVideoEncodeAccelerator::GetSupportedProfiles() {
std::vector<SupportedProfile> profiles;
- const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (!cmd_line->HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode))
return profiles;
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index c2b77a3..071dced 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -1420,17 +1420,17 @@ TEST_F(VideoDecodeAcceleratorTest, TestDecodeTimeMedian) {
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args.
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
// Needed to enable DVLOG through --vmodule.
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
CHECK(logging::InitLogging(settings));
- CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
DCHECK(cmd_line);
- CommandLine::SwitchMap switches = cmd_line->GetSwitches();
+ base::CommandLine::SwitchMap switches = cmd_line->GetSwitches();
for (CommandLine::SwitchMap::const_iterator it = switches.begin();
it != switches.end(); ++it) {
if (it->first == "test_video_data") {
diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc
index b07211d..9d1e3b6 100644
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -1029,7 +1029,7 @@ INSTANTIATE_TEST_CASE_P(
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args.
- CommandLine::Init(argc, argv);
+ base::CommandLine::Init(argc, argv);
base::ShadowingAtExitManager at_exit_manager;
scoped_ptr<base::FilePath::StringType> test_stream_data(
@@ -1043,11 +1043,11 @@ int main(int argc, char** argv) {
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
CHECK(logging::InitLogging(settings));
- CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
DCHECK(cmd_line);
- CommandLine::SwitchMap switches = cmd_line->GetSwitches();
- for (CommandLine::SwitchMap::const_iterator it = switches.begin();
+ base::CommandLine::SwitchMap switches = cmd_line->GetSwitches();
+ for (base::CommandLine::SwitchMap::const_iterator it = switches.begin();
it != switches.end();
++it) {
if (it->first == "test_stream_data") {
diff --git a/content/common/gpu/texture_image_transport_surface.cc b/content/common/gpu/texture_image_transport_surface.cc
index 0ab94e3..f51f545 100644
--- a/content/common/gpu/texture_image_transport_surface.cc
+++ b/content/common/gpu/texture_image_transport_surface.cc
@@ -73,7 +73,8 @@ bool TextureImageTransportSurface::Initialize() {
GpuChannel* parent_channel = manager->LookupChannel(handle_.parent_client_id);
if (parent_channel) {
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess))
helper_->SetPreemptByFlag(parent_channel->GetPreemptionFlag());
}
diff --git a/content/common/handle_enumerator_win.cc b/content/common/handle_enumerator_win.cc
index 0b8cbe5..9816550 100644
--- a/content/common/handle_enumerator_win.cc
+++ b/content/common/handle_enumerator_win.cc
@@ -52,7 +52,7 @@ const size_t kMaxHandleNameLength = 1024;
void HandleEnumerator::EnumerateHandles() {
sandbox::HandleTable handles;
std::string process_type =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessType);
base::string16 output = ASCIIToUTF16(process_type);
output.append(ASCIIToUTF16(" process - Handles at shutdown:\n"));
diff --git a/content/common/pepper_plugin_list.cc b/content/common/pepper_plugin_list.cc
index fac77f6..3a3e0e0 100644
--- a/content/common/pepper_plugin_list.cc
+++ b/content/common/pepper_plugin_list.cc
@@ -36,11 +36,12 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
max_plugins_to_register_from_command_line_exceeds_limit);
bool out_of_process = true;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kPpapiInProcess))
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kPpapiInProcess))
out_of_process = false;
const std::string value =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kRegisterPepperPlugins);
if (value.empty())
return;
diff --git a/content/common/plugin_list.cc b/content/common/plugin_list.cc
index e89aaf9..a0f9507 100644
--- a/content/common/plugin_list.cc
+++ b/content/common/plugin_list.cc
@@ -36,7 +36,7 @@ PluginList* PluginList::Singleton() {
// static
bool PluginList::DebugPluginLoading() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDebugPluginLoading);
}
diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc
index d6f2112..fd96041 100644
--- a/content/common/sandbox_init_mac.cc
+++ b/content/common/sandbox_init_mac.cc
@@ -31,7 +31,8 @@ bool GetSandboxTypeFromCommandLine(int* sandbox_type,
*sandbox_type = -1;
*allowed_dir = base::FilePath(); // Empty by default.
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kNoSandbox))
return false;
diff --git a/content/common/sandbox_init_win.cc b/content/common/sandbox_init_win.cc
index 7d9d920..16e3e4a 100644
--- a/content/common/sandbox_init_win.cc
+++ b/content/common/sandbox_init_win.cc
@@ -14,7 +14,8 @@
namespace content {
bool InitializeSandbox(sandbox::SandboxInterfaceInfo* sandbox_info) {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
sandbox::BrokerServices* broker_services = sandbox_info->broker_services;
if (broker_services) {
if (!InitBrokerServices(broker_services))
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
index c30c166a..673e59d 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -73,7 +73,8 @@ inline bool IsArchitectureArm() {
}
bool IsAcceleratedVideoEnabled() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
bool accelerated_encode_enabled = false;
#if defined(OS_CHROMEOS)
accelerated_encode_enabled =
@@ -143,12 +144,13 @@ ResultExpr GpuBrokerProcessPolicy::EvaluateSyscall(int sysno) const {
}
void UpdateProcessTypeToGpuBroker() {
- CommandLine::StringVector exec = CommandLine::ForCurrentProcess()->GetArgs();
- CommandLine::Reset();
- CommandLine::Init(0, NULL);
- CommandLine::ForCurrentProcess()->InitFromArgv(exec);
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kProcessType,
- "gpu-broker");
+ base::CommandLine::StringVector exec =
+ base::CommandLine::ForCurrentProcess()->GetArgs();
+ base::CommandLine::Reset();
+ base::CommandLine::Init(0, NULL);
+ base::CommandLine::ForCurrentProcess()->InitFromArgv(exec);
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kProcessType, "gpu-broker");
// Update the process title. The argv was already cached by the call to
// SetProcessTitleFromCommandLine in content_main_runner.cc, so we can pass
diff --git a/content/common/sandbox_linux/sandbox_linux.cc b/content/common/sandbox_linux/sandbox_linux.cc
index 88afef9..e15aa18 100644
--- a/content/common/sandbox_linux/sandbox_linux.cc
+++ b/content/common/sandbox_linux/sandbox_linux.cc
@@ -52,7 +52,8 @@ struct FDCloser {
};
void LogSandboxStarted(const std::string& sandbox_name) {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
const std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
const std::string activated_sandbox =
@@ -260,7 +261,7 @@ bool LinuxSandbox::StartSeccompBPF(const std::string& process_type) {
}
bool LinuxSandbox::InitializeSandboxImpl() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
const std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType);
@@ -335,7 +336,7 @@ bool LinuxSandbox::seccomp_bpf_supported() const {
bool LinuxSandbox::LimitAddressSpace(const std::string& process_type) {
(void) process_type;
#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER)
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kNoSandbox)) {
return false;
}
diff --git a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
index ae856ee..c9fda1d 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.
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index f4ea8d5..88a4bcc 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -526,7 +526,8 @@ bool Sandbox::EnableSandbox(int sandbox_type,
// Enable verbose logging if enabled on the command line. (See common.sb
// for details).
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
bool enable_logging =
command_line->HasSwitch(switches::kEnableSandboxLogging);;
if (enable_logging) {
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 69b3795..8065621 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -243,7 +243,7 @@ base::string16 PrependWindowsSessionPath(const base::char16* object) {
}
// Checks if the sandbox should be let to run without a job object assigned.
-bool ShouldSetJobLevel(const CommandLine& cmd_line) {
+bool ShouldSetJobLevel(const base::CommandLine& cmd_line) {
if (!cmd_line.HasSwitch(switches::kAllowNoSandboxJob))
return true;
@@ -379,8 +379,9 @@ bool AddPolicyForSandboxedProcess(sandbox::TargetPolicy* policy) {
// Updates the command line arguments with debug-related flags. If debug flags
// have been used with this process, they will be filtered and added to
// command_line as needed.
-void ProcessDebugFlags(CommandLine* command_line) {
- const CommandLine& current_cmd_line = *CommandLine::ForCurrentProcess();
+void ProcessDebugFlags(base::CommandLine* command_line) {
+ const base::CommandLine& current_cmd_line =
+ *base::CommandLine::ForCurrentProcess();
std::string type = command_line->GetSwitchValueASCII(switches::kProcessType);
if (current_cmd_line.HasSwitch(switches::kWaitForDebuggerChildren)) {
// Look to pass-on the kWaitForDebugger flag.
@@ -500,7 +501,7 @@ BOOL WINAPI DuplicateHandlePatch(HANDLE source_process_handle,
} // namespace
-void SetJobLevel(const CommandLine& cmd_line,
+void SetJobLevel(const base::CommandLine& cmd_line,
sandbox::JobLevel job_level,
uint32 ui_exceptions,
sandbox::TargetPolicy* policy) {
@@ -586,7 +587,8 @@ bool ShouldUseDirectWrite() {
}
// If forced off, don't use it.
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kDisableDirectWrite))
return false;
@@ -604,8 +606,9 @@ bool ShouldUseDirectWrite() {
base::ProcessHandle StartSandboxedProcess(
SandboxedProcessLauncherDelegate* delegate,
- CommandLine* cmd_line) {
- const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
+ base::CommandLine* cmd_line) {
+ const base::CommandLine& browser_command_line =
+ *base::CommandLine::ForCurrentProcess();
std::string type_str = cmd_line->GetSwitchValueASCII(switches::kProcessType);
TRACE_EVENT_BEGIN_ETW("StartProcessWithAccess", 0, type_str);