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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 664373003: Introduce OS_NACL_SFI and OS_NACL_NONSFI macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ipc/ipc_channel_proxy.h" 5 #include "ipc/ipc_channel_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 FROM_HERE, base::Bind(&Context::OnRemoveFilter, context_.get(), 427 FROM_HERE, base::Bind(&Context::OnRemoveFilter, context_.get(),
428 make_scoped_refptr(filter))); 428 make_scoped_refptr(filter)));
429 } 429 }
430 430
431 void ChannelProxy::ClearIPCTaskRunner() { 431 void ChannelProxy::ClearIPCTaskRunner() {
432 DCHECK(CalledOnValidThread()); 432 DCHECK(CalledOnValidThread());
433 433
434 context()->ClearIPCTaskRunner(); 434 context()->ClearIPCTaskRunner();
435 } 435 }
436 436
437 #if defined(OS_POSIX) && \ 437 #if defined(OS_POSIX) && !defined(OS_NACL_SFI)
438 (!defined(OS_NACL) || defined(__native_client_nonsfi__))
439 // See the TODO regarding lazy initialization of the channel in 438 // See the TODO regarding lazy initialization of the channel in
440 // ChannelProxy::Init(). 439 // ChannelProxy::Init().
441 int ChannelProxy::GetClientFileDescriptor() { 440 int ChannelProxy::GetClientFileDescriptor() {
442 DCHECK(CalledOnValidThread()); 441 DCHECK(CalledOnValidThread());
443 442
444 Channel* channel = context_.get()->channel_.get(); 443 Channel* channel = context_.get()->channel_.get();
445 // Channel must have been created first. 444 // Channel must have been created first.
446 DCHECK(channel) << context_.get()->channel_id_; 445 DCHECK(channel) << context_.get()->channel_id_;
447 return channel->GetClientFileDescriptor(); 446 return channel->GetClientFileDescriptor();
448 } 447 }
449 448
450 base::ScopedFD ChannelProxy::TakeClientFileDescriptor() { 449 base::ScopedFD ChannelProxy::TakeClientFileDescriptor() {
451 DCHECK(CalledOnValidThread()); 450 DCHECK(CalledOnValidThread());
452 451
453 Channel* channel = context_.get()->channel_.get(); 452 Channel* channel = context_.get()->channel_.get();
454 // Channel must have been created first. 453 // Channel must have been created first.
455 DCHECK(channel) << context_.get()->channel_id_; 454 DCHECK(channel) << context_.get()->channel_id_;
456 return channel->TakeClientFileDescriptor(); 455 return channel->TakeClientFileDescriptor();
457 } 456 }
458 #endif 457 #endif
459 458
460 //----------------------------------------------------------------------------- 459 //-----------------------------------------------------------------------------
461 460
462 } // namespace IPC 461 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698