| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/nacl/renderer/ppb_nacl_private_impl.h" | 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
| 6 | 6 |
| 7 #include <numeric> | 7 #include <numeric> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 new TrustedPluginChannel( | 407 new TrustedPluginChannel( |
| 408 launch_result.trusted_ipc_channel_handle)); | 408 launch_result.trusted_ipc_channel_handle)); |
| 409 load_manager->set_trusted_plugin_channel(trusted_plugin_channel.Pass()); | 409 load_manager->set_trusted_plugin_channel(trusted_plugin_channel.Pass()); |
| 410 } else { | 410 } else { |
| 411 PostPPCompletionCallback(callback, PP_ERROR_FAILED); | 411 PostPPCompletionCallback(callback, PP_ERROR_FAILED); |
| 412 return; | 412 return; |
| 413 } | 413 } |
| 414 | 414 |
| 415 // Create the manifest service handle as well. | 415 // Create the manifest service handle as well. |
| 416 // For security hardening, disable the IPCs for open_resource() when they | 416 // For security hardening, disable the IPCs for open_resource() when they |
| 417 // aren't needed. PNaCl doesn't expose open_resource(), and the new | 417 // aren't needed. PNaCl doesn't expose open_resource(). Note that |
| 418 // open_resource() IPCs are currently only used for Non-SFI NaCl so far, | 418 // enable_dyncode_syscalls is true if and only if the plugin is a non-PNaCl |
| 419 // not SFI NaCl. Note that enable_dyncode_syscalls is true if and only if | 419 // plugin. |
| 420 // the plugin is a non-PNaCl plugin. | |
| 421 if (load_manager && | 420 if (load_manager && |
| 422 enable_dyncode_syscalls && | 421 enable_dyncode_syscalls && |
| 423 uses_nonsfi_mode && | |
| 424 IsValidChannelHandle( | 422 IsValidChannelHandle( |
| 425 launch_result.manifest_service_ipc_channel_handle)) { | 423 launch_result.manifest_service_ipc_channel_handle)) { |
| 426 scoped_ptr<ManifestServiceChannel> manifest_service_channel( | 424 scoped_ptr<ManifestServiceChannel> manifest_service_channel( |
| 427 new ManifestServiceChannel( | 425 new ManifestServiceChannel( |
| 428 launch_result.manifest_service_ipc_channel_handle, | 426 launch_result.manifest_service_ipc_channel_handle, |
| 429 base::Bind(&PostPPCompletionCallback, callback), | 427 base::Bind(&PostPPCompletionCallback, callback), |
| 430 manifest_service_proxy.Pass(), | 428 manifest_service_proxy.Pass(), |
| 431 content::RenderThread::Get()->GetShutdownEvent())); | 429 content::RenderThread::Get()->GetShutdownEvent())); |
| 432 load_manager->set_manifest_service_channel( | 430 load_manager->set_manifest_service_channel( |
| 433 manifest_service_channel.Pass()); | 431 manifest_service_channel.Pass()); |
| (...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1723 &StreamPexe | 1721 &StreamPexe |
| 1724 }; | 1722 }; |
| 1725 | 1723 |
| 1726 } // namespace | 1724 } // namespace |
| 1727 | 1725 |
| 1728 const PPB_NaCl_Private* GetNaClPrivateInterface() { | 1726 const PPB_NaCl_Private* GetNaClPrivateInterface() { |
| 1729 return &nacl_interface; | 1727 return &nacl_interface; |
| 1730 } | 1728 } |
| 1731 | 1729 |
| 1732 } // namespace nacl | 1730 } // namespace nacl |
| OLD | NEW |