| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 void ChannelProxy::RemoveFilter(MessageFilter* filter) { | 360 void ChannelProxy::RemoveFilter(MessageFilter* filter) { |
| 361 context_->ipc_message_loop()->PostTask( | 361 context_->ipc_message_loop()->PostTask( |
| 362 FROM_HERE, base::Bind(&Context::OnRemoveFilter, context_.get(), | 362 FROM_HERE, base::Bind(&Context::OnRemoveFilter, context_.get(), |
| 363 make_scoped_refptr(filter))); | 363 make_scoped_refptr(filter))); |
| 364 } | 364 } |
| 365 | 365 |
| 366 void ChannelProxy::ClearIPCMessageLoop() { | 366 void ChannelProxy::ClearIPCMessageLoop() { |
| 367 context()->ClearIPCMessageLoop(); | 367 context()->ClearIPCMessageLoop(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 #if defined(OS_POSIX) | 370 #if defined(OS_POSIX) && !defined(OS_NACL) |
| 371 // See the TODO regarding lazy initialization of the channel in | 371 // See the TODO regarding lazy initialization of the channel in |
| 372 // ChannelProxy::Init(). | 372 // ChannelProxy::Init(). |
| 373 int ChannelProxy::GetClientFileDescriptor() { | 373 int ChannelProxy::GetClientFileDescriptor() { |
| 374 Channel* channel = context_.get()->channel_.get(); | 374 Channel* channel = context_.get()->channel_.get(); |
| 375 // Channel must have been created first. | 375 // Channel must have been created first. |
| 376 DCHECK(channel) << context_.get()->channel_id_; | 376 DCHECK(channel) << context_.get()->channel_id_; |
| 377 return channel->GetClientFileDescriptor(); | 377 return channel->GetClientFileDescriptor(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 int ChannelProxy::TakeClientFileDescriptor() { | 380 int ChannelProxy::TakeClientFileDescriptor() { |
| 381 Channel* channel = context_.get()->channel_.get(); | 381 Channel* channel = context_.get()->channel_.get(); |
| 382 // Channel must have been created first. | 382 // Channel must have been created first. |
| 383 DCHECK(channel) << context_.get()->channel_id_; | 383 DCHECK(channel) << context_.get()->channel_id_; |
| 384 return channel->TakeClientFileDescriptor(); | 384 return channel->TakeClientFileDescriptor(); |
| 385 } | 385 } |
| 386 | 386 |
| 387 bool ChannelProxy::GetClientEuid(uid_t* client_euid) const { | 387 bool ChannelProxy::GetClientEuid(uid_t* client_euid) const { |
| 388 Channel* channel = context_.get()->channel_.get(); | 388 Channel* channel = context_.get()->channel_.get(); |
| 389 // Channel must have been created first. | 389 // Channel must have been created first. |
| 390 DCHECK(channel) << context_.get()->channel_id_; | 390 DCHECK(channel) << context_.get()->channel_id_; |
| 391 return channel->GetClientEuid(client_euid); | 391 return channel->GetClientEuid(client_euid); |
| 392 } | 392 } |
| 393 #endif | 393 #endif |
| 394 | 394 |
| 395 //----------------------------------------------------------------------------- | 395 //----------------------------------------------------------------------------- |
| 396 | 396 |
| 397 } // namespace IPC | 397 } // namespace IPC |
| OLD | NEW |