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

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

Issue 517373002: Mojo: Remove the STATE_WAIT_LOCAL_DETACH_AND_REMOTE_REMOVE_ACK endpoint state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « mojo/system/channel.h ('k') | no next file » | 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 #include "mojo/system/channel.h" 5 #include "mojo/system/channel.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 it->second.message_pipe = NULL; 251 it->second.message_pipe = NULL;
252 should_send_remove_message = 252 should_send_remove_message =
253 (remote_id != MessageInTransit::kInvalidEndpointId); 253 (remote_id != MessageInTransit::kInvalidEndpointId);
254 break; 254 break;
255 case EndpointInfo::STATE_WAIT_LOCAL_DETACH: 255 case EndpointInfo::STATE_WAIT_LOCAL_DETACH:
256 local_id_to_endpoint_info_map_.erase(it); 256 local_id_to_endpoint_info_map_.erase(it);
257 break; 257 break;
258 case EndpointInfo::STATE_WAIT_REMOTE_REMOVE_ACK: 258 case EndpointInfo::STATE_WAIT_REMOTE_REMOVE_ACK:
259 NOTREACHED(); 259 NOTREACHED();
260 break; 260 break;
261 case EndpointInfo::STATE_WAIT_LOCAL_DETACH_AND_REMOTE_REMOVE_ACK:
262 it->second.state = EndpointInfo::STATE_WAIT_REMOTE_REMOVE_ACK;
263 break;
264 } 261 }
265 } 262 }
266 if (!should_send_remove_message) 263 if (!should_send_remove_message)
267 return; 264 return;
268 265
269 if (!SendControlMessage( 266 if (!SendControlMessage(
270 MessageInTransit::kSubtypeChannelRemoveMessagePipeEndpoint, 267 MessageInTransit::kSubtypeChannelRemoveMessagePipeEndpoint,
271 local_id, 268 local_id,
272 remote_id)) { 269 remote_id)) {
273 HandleLocalError(base::StringPrintf( 270 HandleLocalError(base::StringPrintf(
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 // TODO(vtl): Is this how we really want to handle this? 525 // TODO(vtl): Is this how we really want to handle this?
529 // Sometimes we'll want to propagate the error back to the message pipe 526 // Sometimes we'll want to propagate the error back to the message pipe
530 // (endpoint), and notify it that the remote is (effectively) closed. 527 // (endpoint), and notify it that the remote is (effectively) closed.
531 // Sometimes we'll want to kill the channel (and notify all the endpoints that 528 // Sometimes we'll want to kill the channel (and notify all the endpoints that
532 // their remotes are dead. 529 // their remotes are dead.
533 LOG(WARNING) << error_message; 530 LOG(WARNING) << error_message;
534 } 531 }
535 532
536 } // namespace system 533 } // namespace system
537 } // namespace mojo 534 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698