Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: components/nacl/loader/nonsfi/nonsfi_listener.cc

Issue 2525483002: Convert NaCl renderer-loader messages to mojo. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/nacl/loader/nonsfi/nonsfi_listener.cc
diff --git a/components/nacl/loader/nonsfi/nonsfi_listener.cc b/components/nacl/loader/nonsfi/nonsfi_listener.cc
index baef08c9878f3296af82a4ae1fbd662adf078036..4c992b8903b9919e30c94c310ee5ff830e712129 100644
--- a/components/nacl/loader/nonsfi/nonsfi_listener.cc
+++ b/components/nacl/loader/nonsfi/nonsfi_listener.cc
@@ -14,6 +14,7 @@
#include "base/rand_util.h"
#include "base/run_loop.h"
#include "build/build_config.h"
+#include "components/nacl/common/nacl.mojom.h"
#include "components/nacl/common/nacl_messages.h"
#include "components/nacl/common/nacl_types.h"
#include "components/nacl/loader/nacl_trusted_listener.h"
@@ -120,12 +121,12 @@ void NonSfiListener::OnStart(const nacl::NaClStartParams& params) {
params.manifest_service_channel_handle);
ppapi::StartUpPlugin();
- // TODO(teravest): Do we plan on using this renderer handle for nexe loading
- // for non-SFI? Right now, passing an empty channel handle instead causes
- // hangs, so we'll keep it.
- trusted_listener_ =
- new NaClTrustedListener(params.trusted_service_channel_handle,
- io_thread_.task_runner().get(), &shutdown_event_);
+ trusted_listener_ = base::MakeUnique<NaClTrustedListener>(
+ mojo::MakeProxy(nacl::mojom::NaClRendererHostPtrInfo(
+ mojo::ScopedMessagePipeHandle(
+ params.trusted_service_channel_handle.mojo_handle),
+ nacl::mojom::NaClRendererHost::Version_)),
dcheng 2016/12/20 06:49:54 I do kind of wonder if it's worth writing a simple
Sam McNally 2016/12/20 10:02:19 I'm not entirely sure which part you're referring
+ io_thread_.task_runner().get());
// Ensure that the validation cache key (used as an extra input to the
// validation cache's hashing) isn't exposed accidentally.

Powered by Google App Engine
This is Rietveld 408576698