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

Side by Side Diff: ipc/mojo/ipc_channel_mojo.h

Issue 621613002: Refactoring: Make IPC::Channel::TakeClientFileDescriptor() a ScopedFD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Mac build Created 6 years, 2 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
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 #ifndef IPC_IPC_CHANNEL_MOJO_H_ 5 #ifndef IPC_IPC_CHANNEL_MOJO_H_
6 #define IPC_IPC_CHANNEL_MOJO_H_ 6 #define IPC_IPC_CHANNEL_MOJO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Channel implementation 92 // Channel implementation
93 virtual bool Connect() override; 93 virtual bool Connect() override;
94 virtual void Close() override; 94 virtual void Close() override;
95 virtual bool Send(Message* message) override; 95 virtual bool Send(Message* message) override;
96 virtual base::ProcessId GetPeerPID() const override; 96 virtual base::ProcessId GetPeerPID() const override;
97 virtual base::ProcessId GetSelfPID() const override; 97 virtual base::ProcessId GetSelfPID() const override;
98 98
99 #if defined(OS_POSIX) && !defined(OS_NACL) 99 #if defined(OS_POSIX) && !defined(OS_NACL)
100 virtual int GetClientFileDescriptor() const override; 100 virtual int GetClientFileDescriptor() const override;
101 virtual int TakeClientFileDescriptor() override; 101 virtual base::ScopedFD TakeClientFileDescriptor() override;
102 102
103 // These access protected API of IPC::Message, which has ChannelMojo 103 // These access protected API of IPC::Message, which has ChannelMojo
104 // as a friend class. 104 // as a friend class.
105 static MojoResult WriteToFileDescriptorSet( 105 static MojoResult WriteToFileDescriptorSet(
106 const std::vector<MojoHandle>& handle_buffer, 106 const std::vector<MojoHandle>& handle_buffer,
107 Message* message); 107 Message* message);
108 static MojoResult ReadFromFileDescriptorSet(Message* message, 108 static MojoResult ReadFromFileDescriptorSet(Message* message,
109 std::vector<MojoHandle>* handles); 109 std::vector<MojoHandle>* handles);
110 110
111 #endif // defined(OS_POSIX) && !defined(OS_NACL) 111 #endif // defined(OS_POSIX) && !defined(OS_NACL)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ScopedVector<Message> pending_messages_; 154 ScopedVector<Message> pending_messages_;
155 155
156 base::WeakPtrFactory<ChannelMojo> weak_factory_; 156 base::WeakPtrFactory<ChannelMojo> weak_factory_;
157 157
158 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); 158 DISALLOW_COPY_AND_ASSIGN(ChannelMojo);
159 }; 159 };
160 160
161 } // namespace IPC 161 } // namespace IPC
162 162
163 #endif // IPC_IPC_CHANNEL_MOJO_H_ 163 #endif // IPC_IPC_CHANNEL_MOJO_H_
OLDNEW
« no previous file with comments | « ipc/ipc_test_sink.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | ppapi/proxy/proxy_channel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698