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

Side by Side Diff: ipc/ipc_channel.h

Issue 1334593002: Reland #2 "ipc: Add a new field num_brokered_attachments to the message header." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and type error. Created 5 years, 3 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
« no previous file with comments | « content/common/resource_messages.cc ('k') | ipc/ipc_channel_common.cc » ('j') | 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 #ifndef IPC_IPC_CHANNEL_H_ 5 #ifndef IPC_IPC_CHANNEL_H_
6 #define IPC_IPC_CHANNEL_H_ 6 #define IPC_IPC_CHANNEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // TODO(erikchen): Remove default parameter for |broker|. It exists only to 162 // TODO(erikchen): Remove default parameter for |broker|. It exists only to
163 // make the upcoming refactor decomposable into smaller CLs. 163 // make the upcoming refactor decomposable into smaller CLs.
164 // http://crbug.com/493414. 164 // http://crbug.com/493414.
165 static scoped_ptr<Channel> CreateServer( 165 static scoped_ptr<Channel> CreateServer(
166 const IPC::ChannelHandle& channel_handle, 166 const IPC::ChannelHandle& channel_handle,
167 Listener* listener, 167 Listener* listener,
168 AttachmentBroker* broker = nullptr); 168 AttachmentBroker* broker = nullptr);
169 169
170 ~Channel() override; 170 ~Channel() override;
171 171
172 // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
173 using MessageVerifier = void (*)(const Message*);
174 static void SetMessageVerifier(MessageVerifier verifier);
175 static MessageVerifier GetMessageVerifier();
176
172 // Connect the pipe. On the server side, this will initiate 177 // Connect the pipe. On the server side, this will initiate
173 // waiting for connections. On the client, it attempts to 178 // waiting for connections. On the client, it attempts to
174 // connect to a pre-existing pipe. Note, calling Connect() 179 // connect to a pre-existing pipe. Note, calling Connect()
175 // will not block the calling thread and may complete 180 // will not block the calling thread and may complete
176 // asynchronously. 181 // asynchronously.
177 virtual bool Connect() WARN_UNUSED_RESULT = 0; 182 virtual bool Connect() WARN_UNUSED_RESULT = 0;
178 183
179 // Close this Channel explicitly. May be called multiple times. 184 // Close this Channel explicitly. May be called multiple times.
180 // On POSIX calling close on an IPC channel that listens for connections will 185 // On POSIX calling close on an IPC channel that listens for connections will
181 // cause it to close any accepted connections, and it will stop listening for 186 // cause it to close any accepted connections, and it will stop listening for
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 272
268 #if defined(OS_POSIX) 273 #if defined(OS_POSIX)
269 // SocketPair() creates a pair of socket FDs suitable for using with 274 // SocketPair() creates a pair of socket FDs suitable for using with
270 // IPC::Channel. 275 // IPC::Channel.
271 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); 276 IPC_EXPORT bool SocketPair(int* fd1, int* fd2);
272 #endif 277 #endif
273 278
274 } // namespace IPC 279 } // namespace IPC
275 280
276 #endif // IPC_IPC_CHANNEL_H_ 281 #endif // IPC_IPC_CHANNEL_H_
OLDNEW
« no previous file with comments | « content/common/resource_messages.cc ('k') | ipc/ipc_channel_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698