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 |
303 // Browser command-line switches to propagate to the utility process. | 304 // Browser command-line switches to propagate to the utility process. |
304 static const char* const kSwitchNames[] = { | 305 static const char* const kSwitchNames[] = { |
305 switches::kEnableNetworkService, | |
306 switches::kHostResolverRules, | 306 switches::kHostResolverRules, |
307 switches::kLogNetLog, | 307 switches::kLogNetLog, |
308 switches::kNoSandbox, | 308 switches::kNoSandbox, |
309 switches::kProfilerTiming, | 309 switches::kProfilerTiming, |
310 switches::kProxyServer, | 310 switches::kProxyServer, |
311 #if defined(OS_MACOSX) | 311 #if defined(OS_MACOSX) |
312 switches::kEnableSandboxLogging, | 312 switches::kEnableSandboxLogging, |
313 #endif | 313 #endif |
314 switches::kUseFakeDeviceForMediaStream, | 314 switches::kUseFakeDeviceForMediaStream, |
315 switches::kUseFileForFakeVideoCapture, | 315 switches::kUseFileForFakeVideoCapture, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 base::WeakPtr<UtilityProcessHostImpl> host, | 394 base::WeakPtr<UtilityProcessHostImpl> host, |
395 int error_code) { | 395 int error_code) { |
396 if (!host) | 396 if (!host) |
397 return; | 397 return; |
398 | 398 |
399 host->OnProcessLaunchFailed(error_code); | 399 host->OnProcessLaunchFailed(error_code); |
400 delete host.get(); | 400 delete host.get(); |
401 } | 401 } |
402 | 402 |
403 } // namespace content | 403 } // namespace content |
OLD | NEW |