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

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

Issue 612903003: Mojo: Split up Channel::RemoveMessagePipeEndpoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@del_onremove
Patch Set: rebased 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
« no previous file with comments | « no previous file | mojo/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_SYSTEM_CHANNEL_H_ 5 #ifndef MOJO_SYSTEM_CHANNEL_H_
6 #define MOJO_SYSTEM_CHANNEL_H_ 6 #define MOJO_SYSTEM_CHANNEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 virtual void OnError(Error error) override; 136 virtual void OnError(Error error) override;
137 137
138 // Helpers for |OnReadMessage| (only called on the creation thread): 138 // Helpers for |OnReadMessage| (only called on the creation thread):
139 void OnReadMessageForDownstream( 139 void OnReadMessageForDownstream(
140 const MessageInTransit::View& message_view, 140 const MessageInTransit::View& message_view,
141 embedder::ScopedPlatformHandleVectorPtr platform_handles); 141 embedder::ScopedPlatformHandleVectorPtr platform_handles);
142 void OnReadMessageForChannel( 142 void OnReadMessageForChannel(
143 const MessageInTransit::View& message_view, 143 const MessageInTransit::View& message_view,
144 embedder::ScopedPlatformHandleVectorPtr platform_handles); 144 embedder::ScopedPlatformHandleVectorPtr platform_handles);
145 145
146 // Removes the message pipe endpoint with the given local ID, which must exist 146 // Handles "remove message pipe endpoint" messages.
147 // and be a zombie, and given remote ID. Returns false on failure, in 147 bool OnRemoveMessagePipeEndpoint(MessageInTransit::EndpointId local_id,
148 // particular if no message pipe with |local_id| is attached. Only called on 148 MessageInTransit::EndpointId remote_id);
149 // the creation thread. 149 // Handles "remove message pipe endpoint ack" messages.
150 bool RemoveMessagePipeEndpoint(MessageInTransit::EndpointId local_id, 150 bool OnRemoveMessagePipeEndpointAck(MessageInTransit::EndpointId local_id);
151 MessageInTransit::EndpointId remote_id);
152 151
153 // Handles errors (e.g., invalid messages) from the remote side. Callable from 152 // Handles errors (e.g., invalid messages) from the remote side. Callable from
154 // any thread. 153 // any thread.
155 void HandleRemoteError(const base::StringPiece& error_message); 154 void HandleRemoteError(const base::StringPiece& error_message);
156 // Handles internal errors/failures from the local side. Callable from any 155 // Handles internal errors/failures from the local side. Callable from any
157 // thread. 156 // thread.
158 void HandleLocalError(const base::StringPiece& error_message); 157 void HandleLocalError(const base::StringPiece& error_message);
159 158
160 // Helper to send channel control messages. Returns true on success. Should be 159 // Helper to send channel control messages. Returns true on success. Should be
161 // called *without* |lock_| held. Callable from any thread. 160 // called *without* |lock_| held. Callable from any thread.
(...skipping 23 matching lines...) Expand all
185 // be checked for existence before use. 184 // be checked for existence before use.
186 MessageInTransit::EndpointId next_local_id_; 185 MessageInTransit::EndpointId next_local_id_;
187 186
188 DISALLOW_COPY_AND_ASSIGN(Channel); 187 DISALLOW_COPY_AND_ASSIGN(Channel);
189 }; 188 };
190 189
191 } // namespace system 190 } // namespace system
192 } // namespace mojo 191 } // namespace mojo
193 192
194 #endif // MOJO_SYSTEM_CHANNEL_H_ 193 #endif // MOJO_SYSTEM_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698