| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 NOTREACHED() << "Unable to get utility process binary name."; | 283 NOTREACHED() << "Unable to get utility process binary name."; |
| 284 return false; | 284 return false; |
| 285 } | 285 } |
| 286 | 286 |
| 287 std::unique_ptr<base::CommandLine> cmd_line = | 287 std::unique_ptr<base::CommandLine> cmd_line = |
| 288 base::MakeUnique<base::CommandLine>(exe_path); | 288 base::MakeUnique<base::CommandLine>(exe_path); |
| 289 #endif | 289 #endif |
| 290 | 290 |
| 291 cmd_line->AppendSwitchASCII(switches::kProcessType, | 291 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 292 switches::kUtilityProcess); | 292 switches::kUtilityProcess); |
| 293 BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(cmd_line.get()); |
| 293 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); | 294 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); |
| 294 cmd_line->AppendSwitchASCII(switches::kLang, locale); | 295 cmd_line->AppendSwitchASCII(switches::kLang, locale); |
| 295 | 296 |
| 296 #if defined(OS_WIN) | 297 #if defined(OS_WIN) |
| 297 cmd_line->AppendArg(switches::kPrefetchArgumentOther); | 298 cmd_line->AppendArg(switches::kPrefetchArgumentOther); |
| 298 #endif // defined(OS_WIN) | 299 #endif // defined(OS_WIN) |
| 299 | 300 |
| 300 if (no_sandbox_) | 301 if (no_sandbox_) |
| 301 cmd_line->AppendSwitch(switches::kNoSandbox); | 302 cmd_line->AppendSwitch(switches::kNoSandbox); |
| 302 | 303 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 base::WeakPtr<UtilityProcessHostImpl> host, | 395 base::WeakPtr<UtilityProcessHostImpl> host, |
| 395 int error_code) { | 396 int error_code) { |
| 396 if (!host) | 397 if (!host) |
| 397 return; | 398 return; |
| 398 | 399 |
| 399 host->OnProcessLaunchFailed(error_code); | 400 host->OnProcessLaunchFailed(error_code); |
| 400 delete host.get(); | 401 delete host.get(); |
| 401 } | 402 } |
| 402 | 403 |
| 403 } // namespace content | 404 } // namespace content |
| OLD | NEW |