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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 336 |
337 #if defined(OS_WIN) | 337 #if defined(OS_WIN) |
338 // Let the utility process know if it is intended to be elevated. | 338 // Let the utility process know if it is intended to be elevated. |
339 if (run_elevated_) | 339 if (run_elevated_) |
340 cmd_line->AppendSwitch(switches::kUtilityProcessRunningElevated); | 340 cmd_line->AppendSwitch(switches::kUtilityProcessRunningElevated); |
341 #endif | 341 #endif |
342 | 342 |
343 process_->Launch(new UtilitySandboxedProcessLauncherDelegate( | 343 process_->Launch(new UtilitySandboxedProcessLauncherDelegate( |
344 exposed_dir_, run_elevated_, no_sandbox_, env_, | 344 exposed_dir_, run_elevated_, no_sandbox_, env_, |
345 process_->GetHost()), | 345 process_->GetHost()), |
346 cmd_line, nullptr, true); | 346 cmd_line, true); |
347 } | 347 } |
348 | 348 |
349 return true; | 349 return true; |
350 } | 350 } |
351 | 351 |
352 bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) { | 352 bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) { |
353 if (!client_.get()) | 353 if (!client_.get()) |
354 return true; | 354 return true; |
355 | 355 |
356 client_task_runner_->PostTask( | 356 client_task_runner_->PostTask( |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 base::WeakPtr<UtilityProcessHostImpl> host, | 397 base::WeakPtr<UtilityProcessHostImpl> host, |
398 int error_code) { | 398 int error_code) { |
399 if (!host) | 399 if (!host) |
400 return; | 400 return; |
401 | 401 |
402 host->OnProcessLaunchFailed(error_code); | 402 host->OnProcessLaunchFailed(error_code); |
403 delete host.get(); | 403 delete host.get(); |
404 } | 404 } |
405 | 405 |
406 } // namespace content | 406 } // namespace content |
OLD | NEW |