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

Unified Diff: components/nacl/loader/nacl_trusted_listener.cc

Issue 439713002: Refactoring: Split NaClListener into two delegated classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and redesign based on Mark's comment. Created 6 years, 4 months 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
« no previous file with comments | « components/nacl/loader/nacl_trusted_listener.h ('k') | components/nacl/loader/nonsfi/nonsfi_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_trusted_listener.cc
diff --git a/components/nacl/loader/nacl_trusted_listener.cc b/components/nacl/loader/nacl_trusted_listener.cc
index 5f6410a83f0f14632fe05166d209d17b07ed7a3c..125f146c3352d0dae76b3cd448c2ddf865b2ea7b 100644
--- a/components/nacl/loader/nacl_trusted_listener.cc
+++ b/components/nacl/loader/nacl_trusted_listener.cc
@@ -8,22 +8,23 @@
NaClTrustedListener::NaClTrustedListener(
const IPC::ChannelHandle& handle,
- base::SingleThreadTaskRunner* ipc_task_runner) {
- channel_proxy_ = IPC::ChannelProxy::Create(
- handle,
- IPC::Channel::MODE_SERVER,
- this,
- ipc_task_runner).Pass();
+ base::SingleThreadTaskRunner* ipc_task_runner)
+ : channel_handle_(handle),
+ channel_proxy_(IPC::ChannelProxy::Create(
+ handle, IPC::Channel::MODE_SERVER, this, ipc_task_runner)) {
}
NaClTrustedListener::~NaClTrustedListener() {
}
+IPC::ChannelHandle NaClTrustedListener::TakeClientChannelHandle() {
+ IPC::ChannelHandle handle = channel_handle_;
#if defined(OS_POSIX)
-int NaClTrustedListener::TakeClientFileDescriptor() {
- return channel_proxy_->TakeClientFileDescriptor();
-}
+ handle.socket =
+ base::FileDescriptor(channel_proxy_->TakeClientFileDescriptor(), true);
#endif
+ return handle;
+}
bool NaClTrustedListener::OnMessageReceived(const IPC::Message& msg) {
return false;
« no previous file with comments | « components/nacl/loader/nacl_trusted_listener.h ('k') | components/nacl/loader/nonsfi/nonsfi_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698