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

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

Issue 133213012: Mojo: TYPE_CHANNEL -> kTypeChannel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/system/message_in_transit.h » ('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 #include "mojo/system/channel.h" 5 #include "mojo/system/channel.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 << "Destroying Channel with " << local_id_to_endpoint_info_map_.size() 132 << "Destroying Channel with " << local_id_to_endpoint_info_map_.size()
133 << " endpoints still present"; 133 << " endpoints still present";
134 } 134 }
135 135
136 void Channel::OnReadMessage(const MessageInTransit& message) { 136 void Channel::OnReadMessage(const MessageInTransit& message) {
137 switch (message.type()) { 137 switch (message.type()) {
138 case MessageInTransit::kTypeMessagePipeEndpoint: 138 case MessageInTransit::kTypeMessagePipeEndpoint:
139 case MessageInTransit::kTypeMessagePipe: 139 case MessageInTransit::kTypeMessagePipe:
140 OnReadMessageForDownstream(message); 140 OnReadMessageForDownstream(message);
141 break; 141 break;
142 case MessageInTransit::TYPE_CHANNEL: 142 case MessageInTransit::kTypeChannel:
143 OnReadMessageForChannel(message); 143 OnReadMessageForChannel(message);
144 break; 144 break;
145 default: 145 default:
146 HandleRemoteError(base::StringPrintf( 146 HandleRemoteError(base::StringPrintf(
147 "Received message of invalid type %u", 147 "Received message of invalid type %u",
148 static_cast<unsigned>(message.type()))); 148 static_cast<unsigned>(message.type())));
149 break; 149 break;
150 } 150 }
151 } 151 }
152 152
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 LOG(WARNING) << error_message; 215 LOG(WARNING) << error_message;
216 } 216 }
217 217
218 void Channel::HandleLocalError(const base::StringPiece& error_message) { 218 void Channel::HandleLocalError(const base::StringPiece& error_message) {
219 // TODO(vtl): Is this how we really want to handle this? 219 // TODO(vtl): Is this how we really want to handle this?
220 LOG(FATAL) << error_message; 220 LOG(FATAL) << error_message;
221 } 221 }
222 222
223 } // namespace system 223 } // namespace system
224 } // namespace mojo 224 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/system/message_in_transit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698