| 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 "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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 } | 429 } |
| 430 | 430 |
| 431 int ChannelProxy::TakeClientFileDescriptor() { | 431 int ChannelProxy::TakeClientFileDescriptor() { |
| 432 DCHECK(CalledOnValidThread()); | 432 DCHECK(CalledOnValidThread()); |
| 433 | 433 |
| 434 Channel* channel = context_.get()->channel_.get(); | 434 Channel* channel = context_.get()->channel_.get(); |
| 435 // Channel must have been created first. | 435 // Channel must have been created first. |
| 436 DCHECK(channel) << context_.get()->channel_id_; | 436 DCHECK(channel) << context_.get()->channel_id_; |
| 437 return channel->TakeClientFileDescriptor(); | 437 return channel->TakeClientFileDescriptor(); |
| 438 } | 438 } |
| 439 | |
| 440 bool ChannelProxy::GetPeerEuid(uid_t* peer_euid) const { | |
| 441 DCHECK(CalledOnValidThread()); | |
| 442 | |
| 443 Channel* channel = context_.get()->channel_.get(); | |
| 444 // Channel must have been created first. | |
| 445 DCHECK(channel) << context_.get()->channel_id_; | |
| 446 return channel->GetPeerEuid(peer_euid); | |
| 447 } | |
| 448 #endif | 439 #endif |
| 449 | 440 |
| 450 //----------------------------------------------------------------------------- | 441 //----------------------------------------------------------------------------- |
| 451 | 442 |
| 452 } // namespace IPC | 443 } // namespace IPC |
| OLD | NEW |