| 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 "chrome/service/service_utility_process_host.h" | 5 #include "chrome/service/service_utility_process_host.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 base::Process process; | 268 base::Process process; |
| 269 sandbox::ResultCode result = content::StartSandboxedProcess( | 269 sandbox::ResultCode result = content::StartSandboxedProcess( |
| 270 &delegate, cmd_line, handles, &process); | 270 &delegate, cmd_line, handles, &process); |
| 271 if (result == sandbox::SBOX_ALL_OK) { | 271 if (result == sandbox::SBOX_ALL_OK) { |
| 272 process_ = std::move(process); | 272 process_ = std::move(process); |
| 273 success = true; | 273 success = true; |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 | 276 |
| 277 if (success) | 277 if (success) |
| 278 process_connection_.Connect(process_.Handle(), std::move(parent_handle)); | 278 process_connection_.Connect( |
| 279 process_.Handle(), |
| 280 mojo::edk::ConnectionParams(std::move(parent_handle))); |
| 279 | 281 |
| 280 return success; | 282 return success; |
| 281 } | 283 } |
| 282 | 284 |
| 283 bool ServiceUtilityProcessHost::Send(IPC::Message* msg) { | 285 bool ServiceUtilityProcessHost::Send(IPC::Message* msg) { |
| 284 if (child_process_host_) | 286 if (child_process_host_) |
| 285 return child_process_host_->Send(msg); | 287 return child_process_host_->Send(msg); |
| 286 delete msg; | 288 delete msg; |
| 287 return false; | 289 return false; |
| 288 } | 290 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 return false; | 437 return false; |
| 436 } | 438 } |
| 437 printing::Emf emf; | 439 printing::Emf emf; |
| 438 if (!emf.InitFromData(data.data(), data.size())) { | 440 if (!emf.InitFromData(data.data(), data.size())) { |
| 439 OnRenderPDFPagesToMetafileDone(false); | 441 OnRenderPDFPagesToMetafileDone(false); |
| 440 return false; | 442 return false; |
| 441 } | 443 } |
| 442 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); | 444 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); |
| 443 return true; | 445 return true; |
| 444 } | 446 } |
| OLD | NEW |