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

Side by Side Diff: mojo/edk/system/channel.h

Issue 801093002: Delete Channel::SerializeEndpoint(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 | « no previous file | mojo/edk/system/channel.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MOJO_EDK_SYSTEM_CHANNEL_H_ 5 #ifndef MOJO_EDK_SYSTEM_CHANNEL_H_
6 #define MOJO_EDK_SYSTEM_CHANNEL_H_ 6 #define MOJO_EDK_SYSTEM_CHANNEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 scoped_refptr<ChannelEndpoint> SerializeEndpointWithLocalPeer( 144 scoped_refptr<ChannelEndpoint> SerializeEndpointWithLocalPeer(
145 void* destination, 145 void* destination,
146 MessageInTransitQueue* message_queue, 146 MessageInTransitQueue* message_queue,
147 ChannelEndpointClient* endpoint_client, 147 ChannelEndpointClient* endpoint_client,
148 unsigned endpoint_client_port); 148 unsigned endpoint_client_port);
149 void SerializeEndpointWithRemotePeer( 149 void SerializeEndpointWithRemotePeer(
150 void* destination, 150 void* destination,
151 MessageInTransitQueue* message_queue, 151 MessageInTransitQueue* message_queue,
152 scoped_refptr<ChannelEndpoint> peer_endpoint); 152 scoped_refptr<ChannelEndpoint> peer_endpoint);
153 153
154 // Serializes the given endpoint, writing to |destination| auxiliary
155 // information to be transmitted to the peer |Channel| via some other means.
156 // |destination| should point to a buffer of (at least) the size returned by
157 // |GetSerializedEndpointSize()| (exactly that much data will be written).
158 // TODO(vtl): Delete this once I get rid of its use in tests.
159 void SerializeEndpoint(scoped_refptr<ChannelEndpoint> endpoint,
160 void* destination);
161
162 // Deserializes an endpoint that was sent from the peer |Channel| (using 154 // Deserializes an endpoint that was sent from the peer |Channel| (using
163 // |SerializeEndpoint...()|. |source| should be (a copy of) the data that 155 // |SerializeEndpoint...()|. |source| should be (a copy of) the data that
164 // |SerializeEndpoint...()| wrote, and must be (at least) 156 // |SerializeEndpoint...()| wrote, and must be (at least)
165 // |GetSerializedEndpointSize()| bytes. This returns the deserialized 157 // |GetSerializedEndpointSize()| bytes. This returns the deserialized
166 // |IncomingEndpoint| (which can be converted into a |MessagePipe|) or null on 158 // |IncomingEndpoint| (which can be converted into a |MessagePipe|) or null on
167 // error. 159 // error.
168 scoped_refptr<IncomingEndpoint> DeserializeEndpoint(const void* source); 160 scoped_refptr<IncomingEndpoint> DeserializeEndpoint(const void* source);
169 161
170 // See |RawChannel::GetSerializedPlatformHandleSize()|. 162 // See |RawChannel::GetSerializedPlatformHandleSize()|.
171 size_t GetSerializedPlatformHandleSize() const; 163 size_t GetSerializedPlatformHandleSize() const;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // if/when we wrap). 252 // if/when we wrap).
261 RemoteChannelEndpointIdGenerator remote_id_generator_; 253 RemoteChannelEndpointIdGenerator remote_id_generator_;
262 254
263 DISALLOW_COPY_AND_ASSIGN(Channel); 255 DISALLOW_COPY_AND_ASSIGN(Channel);
264 }; 256 };
265 257
266 } // namespace system 258 } // namespace system
267 } // namespace mojo 259 } // namespace mojo
268 260
269 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_ 261 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698