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

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

Issue 597413002: Mojo: NULL -> nullptr in mojo/system and mojo/embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: EXPECT_TRUE 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 | « mojo/system/message_in_transit.h ('k') | mojo/system/message_pipe_dispatcher.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 #include "mojo/system/message_pipe.h" 5 #include "mojo/system/message_pipe.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/system/channel_endpoint.h" 8 #include "mojo/system/channel_endpoint.h"
9 #include "mojo/system/local_message_pipe_endpoint.h" 9 #include "mojo/system/local_message_pipe_endpoint.h"
10 #include "mojo/system/message_in_transit.h" 10 #include "mojo/system/message_in_transit.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 channel_endpoint.get(), 177 channel_endpoint.get(),
178 static_cast<LocalMessagePipeEndpoint*>(endpoints_[port].get()), 178 static_cast<LocalMessagePipeEndpoint*>(endpoints_[port].get()),
179 is_peer_open)); 179 is_peer_open));
180 endpoints_[port].swap(replacement_endpoint); 180 endpoints_[port].swap(replacement_endpoint);
181 181
182 return channel_endpoint; 182 return channel_endpoint;
183 } 183 }
184 184
185 MojoResult MessagePipe::EnqueueMessage(unsigned port, 185 MojoResult MessagePipe::EnqueueMessage(unsigned port,
186 scoped_ptr<MessageInTransit> message) { 186 scoped_ptr<MessageInTransit> message) {
187 return EnqueueMessageInternal(port, message.Pass(), NULL); 187 return EnqueueMessageInternal(port, message.Pass(), nullptr);
188 } 188 }
189 189
190 bool MessagePipe::Attach(unsigned port, ChannelEndpoint* channel_endpoint) { 190 bool MessagePipe::Attach(unsigned port, ChannelEndpoint* channel_endpoint) {
191 DCHECK(port == 0 || port == 1); 191 DCHECK(port == 0 || port == 1);
192 DCHECK(channel_endpoint); 192 DCHECK(channel_endpoint);
193 193
194 base::AutoLock locker(lock_); 194 base::AutoLock locker(lock_);
195 if (!endpoints_[port]) 195 if (!endpoints_[port])
196 return false; 196 return false;
197 197
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 MojoResult MessagePipe::HandleControlMessage( 314 MojoResult MessagePipe::HandleControlMessage(
315 unsigned /*port*/, 315 unsigned /*port*/,
316 scoped_ptr<MessageInTransit> message) { 316 scoped_ptr<MessageInTransit> message) {
317 LOG(WARNING) << "Unrecognized MessagePipe control message subtype " 317 LOG(WARNING) << "Unrecognized MessagePipe control message subtype "
318 << message->subtype(); 318 << message->subtype();
319 return MOJO_RESULT_UNKNOWN; 319 return MOJO_RESULT_UNKNOWN;
320 } 320 }
321 321
322 } // namespace system 322 } // namespace system
323 } // namespace mojo 323 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/message_in_transit.h ('k') | mojo/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698