| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 new TrustedPluginChannel( | 420 new TrustedPluginChannel( |
| 421 launch_result.trusted_ipc_channel_handle)); | 421 launch_result.trusted_ipc_channel_handle)); |
| 422 load_manager->set_trusted_plugin_channel(trusted_plugin_channel.Pass()); | 422 load_manager->set_trusted_plugin_channel(trusted_plugin_channel.Pass()); |
| 423 } else { | 423 } else { |
| 424 PostPPCompletionCallback(callback, PP_ERROR_FAILED); | 424 PostPPCompletionCallback(callback, PP_ERROR_FAILED); |
| 425 return; | 425 return; |
| 426 } | 426 } |
| 427 | 427 |
| 428 // Create the manifest service handle as well. | 428 // Create the manifest service handle as well. |
| 429 // For security hardening, disable the IPCs for open_resource() when they | 429 // For security hardening, disable the IPCs for open_resource() when they |
| 430 // aren't needed. PNaCl doesn't expose open_resource(), and the new | 430 // aren't needed. PNaCl doesn't expose open_resource(). Note that |
| 431 // open_resource() IPCs are currently only used for Non-SFI NaCl so far, | 431 // enable_dyncode_syscalls is true if and only if the plugin is a non-PNaCl |
| 432 // not SFI NaCl. Note that enable_dyncode_syscalls is true if and only if | 432 // plugin. |
| 433 // the plugin is a non-PNaCl plugin. | |
| 434 if (load_manager && | 433 if (load_manager && |
| 435 enable_dyncode_syscalls && | 434 enable_dyncode_syscalls && |
| 436 uses_nonsfi_mode && | |
| 437 IsValidChannelHandle( | 435 IsValidChannelHandle( |
| 438 launch_result.manifest_service_ipc_channel_handle)) { | 436 launch_result.manifest_service_ipc_channel_handle)) { |
| 439 scoped_ptr<ManifestServiceChannel> manifest_service_channel( | 437 scoped_ptr<ManifestServiceChannel> manifest_service_channel( |
| 440 new ManifestServiceChannel( | 438 new ManifestServiceChannel( |
| 441 launch_result.manifest_service_ipc_channel_handle, | 439 launch_result.manifest_service_ipc_channel_handle, |
| 442 base::Bind(&PostPPCompletionCallback, callback), | 440 base::Bind(&PostPPCompletionCallback, callback), |
| 443 manifest_service_proxy.Pass(), | 441 manifest_service_proxy.Pass(), |
| 444 content::RenderThread::Get()->GetShutdownEvent())); | 442 content::RenderThread::Get()->GetShutdownEvent())); |
| 445 load_manager->set_manifest_service_channel( | 443 load_manager->set_manifest_service_channel( |
| 446 manifest_service_channel.Pass()); | 444 manifest_service_channel.Pass()); |
| (...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1733 &StreamPexe | 1731 &StreamPexe |
| 1734 }; | 1732 }; |
| 1735 | 1733 |
| 1736 } // namespace | 1734 } // namespace |
| 1737 | 1735 |
| 1738 const PPB_NaCl_Private* GetNaClPrivateInterface() { | 1736 const PPB_NaCl_Private* GetNaClPrivateInterface() { |
| 1739 return &nacl_interface; | 1737 return &nacl_interface; |
| 1740 } | 1738 } |
| 1741 | 1739 |
| 1742 } // namespace nacl | 1740 } // namespace nacl |
| OLD | NEW |