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

Side by Side Diff: components/nacl/loader/nacl_trusted_listener.cc

Issue 301973003: Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mac build Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/loader/nacl_trusted_listener.h" 5 #include "components/nacl/loader/nacl_trusted_listener.h"
6 6
7 NaClTrustedListener::NaClTrustedListener( 7 NaClTrustedListener::NaClTrustedListener(
8 const IPC::ChannelHandle& handle, 8 const IPC::ChannelHandle& handle,
9 base::MessageLoopProxy* message_loop_proxy, 9 base::MessageLoopProxy* message_loop_proxy,
10 base::WaitableEvent* shutdown_event) { 10 base::WaitableEvent* shutdown_event) {
11 channel_.reset(new IPC::SyncChannel(handle, IPC::Channel::MODE_SERVER, this, 11 channel_ = IPC::SyncChannel::CreateServer(
12 message_loop_proxy, true, 12 handle, this, message_loop_proxy, true, shutdown_event);
13 shutdown_event));
14 } 13 }
15 14
16 NaClTrustedListener::~NaClTrustedListener() { 15 NaClTrustedListener::~NaClTrustedListener() {
17 } 16 }
18 17
19 #if defined(OS_POSIX) 18 #if defined(OS_POSIX)
20 int NaClTrustedListener::TakeClientFileDescriptor() { 19 int NaClTrustedListener::TakeClientFileDescriptor() {
21 return channel_->TakeClientFileDescriptor(); 20 return channel_->TakeClientFileDescriptor();
22 } 21 }
23 #endif 22 #endif
24 23
25 bool NaClTrustedListener::OnMessageReceived(const IPC::Message& msg) { 24 bool NaClTrustedListener::OnMessageReceived(const IPC::Message& msg) {
26 return false; 25 return false;
27 } 26 }
28 27
29 void NaClTrustedListener::OnChannelConnected(int32 peer_pid) { 28 void NaClTrustedListener::OnChannelConnected(int32 peer_pid) {
30 } 29 }
31 30
32 void NaClTrustedListener::OnChannelError() { 31 void NaClTrustedListener::OnChannelError() {
33 channel_->Close(); 32 channel_->Close();
34 } 33 }
35 34
36 bool NaClTrustedListener::Send(IPC::Message* msg) { 35 bool NaClTrustedListener::Send(IPC::Message* msg) {
37 return channel_->Send(msg); 36 return channel_->Send(msg);
38 } 37 }
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_listener.cc ('k') | components/nacl/renderer/manifest_service_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698