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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 10167024: Add ipc_channel_nacl to the untrusted build and fix all compile/link errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 (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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 void ChannelProxy::RemoveFilter(MessageFilter* filter) { 380 void ChannelProxy::RemoveFilter(MessageFilter* filter) {
381 context_->ipc_message_loop()->PostTask( 381 context_->ipc_message_loop()->PostTask(
382 FROM_HERE, base::Bind(&Context::OnRemoveFilter, context_.get(), 382 FROM_HERE, base::Bind(&Context::OnRemoveFilter, context_.get(),
383 make_scoped_refptr(filter))); 383 make_scoped_refptr(filter)));
384 } 384 }
385 385
386 void ChannelProxy::ClearIPCMessageLoop() { 386 void ChannelProxy::ClearIPCMessageLoop() {
387 context()->ClearIPCMessageLoop(); 387 context()->ClearIPCMessageLoop();
388 } 388 }
389 389
390 #if defined(OS_POSIX) && !defined(OS_NACL) 390 #if defined(OS_POSIX)
391 // See the TODO regarding lazy initialization of the channel in 391 // See the TODO regarding lazy initialization of the channel in
392 // ChannelProxy::Init(). 392 // ChannelProxy::Init().
393 int ChannelProxy::GetClientFileDescriptor() { 393 int ChannelProxy::GetClientFileDescriptor() {
394 Channel* channel = context_.get()->channel_.get(); 394 Channel* channel = context_.get()->channel_.get();
395 // Channel must have been created first. 395 // Channel must have been created first.
396 DCHECK(channel) << context_.get()->channel_id_; 396 DCHECK(channel) << context_.get()->channel_id_;
397 return channel->GetClientFileDescriptor(); 397 return channel->GetClientFileDescriptor();
398 } 398 }
399 399
400 int ChannelProxy::TakeClientFileDescriptor() { 400 int ChannelProxy::TakeClientFileDescriptor() {
401 Channel* channel = context_.get()->channel_.get(); 401 Channel* channel = context_.get()->channel_.get();
402 // Channel must have been created first. 402 // Channel must have been created first.
403 DCHECK(channel) << context_.get()->channel_id_; 403 DCHECK(channel) << context_.get()->channel_id_;
404 return channel->TakeClientFileDescriptor(); 404 return channel->TakeClientFileDescriptor();
405 } 405 }
406 406
407 bool ChannelProxy::GetClientEuid(uid_t* client_euid) const { 407 bool ChannelProxy::GetClientEuid(uid_t* client_euid) const {
408 Channel* channel = context_.get()->channel_.get(); 408 Channel* channel = context_.get()->channel_.get();
409 // Channel must have been created first. 409 // Channel must have been created first.
410 DCHECK(channel) << context_.get()->channel_id_; 410 DCHECK(channel) << context_.get()->channel_id_;
411 return channel->GetClientEuid(client_euid); 411 return channel->GetClientEuid(client_euid);
412 } 412 }
413 #endif 413 #endif
414 414
415 //----------------------------------------------------------------------------- 415 //-----------------------------------------------------------------------------
416 416
417 } // namespace IPC 417 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698