| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/utility_process_host_impl.h" | 5 #include "content/browser/utility_process_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 305 |
| 306 base::CommandLine* cmd_line = new base::CommandLine(exe_path); | 306 base::CommandLine* cmd_line = new base::CommandLine(exe_path); |
| 307 #endif | 307 #endif |
| 308 | 308 |
| 309 cmd_line->AppendSwitchASCII(switches::kProcessType, | 309 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 310 switches::kUtilityProcess); | 310 switches::kUtilityProcess); |
| 311 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 311 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
| 312 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); | 312 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); |
| 313 cmd_line->AppendSwitchASCII(switches::kLang, locale); | 313 cmd_line->AppendSwitchASCII(switches::kLang, locale); |
| 314 | 314 |
| 315 #if defined(OS_WIN) |
| 316 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) |
| 317 cmd_line->AppendArg(switches::kPrefetchArgumentOther); |
| 318 #endif // defined(OS_WIN) |
| 319 |
| 315 if (no_sandbox_) | 320 if (no_sandbox_) |
| 316 cmd_line->AppendSwitch(switches::kNoSandbox); | 321 cmd_line->AppendSwitch(switches::kNoSandbox); |
| 317 | 322 |
| 318 // Browser command-line switches to propagate to the utility process. | 323 // Browser command-line switches to propagate to the utility process. |
| 319 static const char* const kSwitchNames[] = { | 324 static const char* const kSwitchNames[] = { |
| 320 switches::kDebugPluginLoading, | 325 switches::kDebugPluginLoading, |
| 321 switches::kNoSandbox, | 326 switches::kNoSandbox, |
| 322 switches::kProfilerTiming, | 327 switches::kProfilerTiming, |
| 323 #if defined(OS_MACOSX) | 328 #if defined(OS_MACOSX) |
| 324 switches::kEnableSandboxLogging, | 329 switches::kEnableSandboxLogging, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 if (RenderProcessHost::run_renderer_in_process()) | 402 if (RenderProcessHost::run_renderer_in_process()) |
| 398 handle = base::GetCurrentProcessHandle(); | 403 handle = base::GetCurrentProcessHandle(); |
| 399 else | 404 else |
| 400 handle = process_->GetData().handle; | 405 handle = process_->GetData().handle; |
| 401 | 406 |
| 402 mojo_application_host_->Activate(this, handle); | 407 mojo_application_host_->Activate(this, handle); |
| 403 } | 408 } |
| 404 } | 409 } |
| 405 | 410 |
| 406 } // namespace content | 411 } // namespace content |
| OLD | NEW |