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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::kMojoChannelToken, | 311 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, |
312 mojo_channel_token); | 312 mojo_channel_token); |
313 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); | 313 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); |
314 cmd_line->AppendSwitchASCII(switches::kLang, locale); | 314 cmd_line->AppendSwitchASCII(switches::kLang, locale); |
315 | 315 |
316 #if defined(OS_WIN) | 316 #if defined(OS_WIN) |
317 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) | 317 cmd_line->AppendArg(switches::kPrefetchArgumentOther); |
318 cmd_line->AppendArg(switches::kPrefetchArgumentOther); | |
319 #endif // defined(OS_WIN) | 318 #endif // defined(OS_WIN) |
320 | 319 |
321 if (no_sandbox_) | 320 if (no_sandbox_) |
322 cmd_line->AppendSwitch(switches::kNoSandbox); | 321 cmd_line->AppendSwitch(switches::kNoSandbox); |
323 | 322 |
324 // Browser command-line switches to propagate to the utility process. | 323 // Browser command-line switches to propagate to the utility process. |
325 static const char* const kSwitchNames[] = { | 324 static const char* const kSwitchNames[] = { |
326 switches::kNoSandbox, | 325 switches::kNoSandbox, |
327 switches::kProfilerTiming, | 326 switches::kProfilerTiming, |
328 #if defined(OS_MACOSX) | 327 #if defined(OS_MACOSX) |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 base::WeakPtr<UtilityProcessHostImpl> host, | 412 base::WeakPtr<UtilityProcessHostImpl> host, |
414 int error_code) { | 413 int error_code) { |
415 if (!host) | 414 if (!host) |
416 return; | 415 return; |
417 | 416 |
418 host->OnProcessLaunchFailed(error_code); | 417 host->OnProcessLaunchFailed(error_code); |
419 delete host.get(); | 418 delete host.get(); |
420 } | 419 } |
421 | 420 |
422 } // namespace content | 421 } // namespace content |
OLD | NEW |