| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 #if defined(OS_WIN) | 304 #if defined(OS_WIN) |
| 305 cmd_line->AppendArg(switches::kPrefetchArgumentOther); | 305 cmd_line->AppendArg(switches::kPrefetchArgumentOther); |
| 306 #endif // defined(OS_WIN) | 306 #endif // defined(OS_WIN) |
| 307 | 307 |
| 308 if (no_sandbox_) | 308 if (no_sandbox_) |
| 309 cmd_line->AppendSwitch(switches::kNoSandbox); | 309 cmd_line->AppendSwitch(switches::kNoSandbox); |
| 310 | 310 |
| 311 // Browser command-line switches to propagate to the utility process. | 311 // Browser command-line switches to propagate to the utility process. |
| 312 static const char* const kSwitchNames[] = { | 312 static const char* const kSwitchNames[] = { |
| 313 switches::kHeadless, |
| 313 switches::kNoSandbox, | 314 switches::kNoSandbox, |
| 314 switches::kProfilerTiming, | 315 switches::kProfilerTiming, |
| 315 #if defined(OS_MACOSX) | 316 #if defined(OS_MACOSX) |
| 316 switches::kEnableSandboxLogging, | 317 switches::kEnableSandboxLogging, |
| 317 #endif | 318 #endif |
| 318 }; | 319 }; |
| 319 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 320 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 320 arraysize(kSwitchNames)); | 321 arraysize(kSwitchNames)); |
| 321 | 322 |
| 322 if (has_cmd_prefix) { | 323 if (has_cmd_prefix) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 base::WeakPtr<UtilityProcessHostImpl> host, | 394 base::WeakPtr<UtilityProcessHostImpl> host, |
| 394 int error_code) { | 395 int error_code) { |
| 395 if (!host) | 396 if (!host) |
| 396 return; | 397 return; |
| 397 | 398 |
| 398 host->OnProcessLaunchFailed(error_code); | 399 host->OnProcessLaunchFailed(error_code); |
| 399 delete host.get(); | 400 delete host.get(); |
| 400 } | 401 } |
| 401 | 402 |
| 402 } // namespace content | 403 } // namespace content |
| OLD | NEW |