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