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

Side by Side Diff: mojo/edk/system/message_in_transit.cc

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 years, 11 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/edk/system/incoming_endpoint.h ('k') | mojo/edk/system/message_pipe.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/edk/system/message_in_transit.h" 5 #include "mojo/edk/system/message_in_transit.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 #endif 170 #endif
171 } 171 }
172 172
173 void MessageInTransit::SetTransportData( 173 void MessageInTransit::SetTransportData(
174 scoped_ptr<TransportData> transport_data) { 174 scoped_ptr<TransportData> transport_data) {
175 DCHECK(transport_data); 175 DCHECK(transport_data);
176 DCHECK(!transport_data_); 176 DCHECK(!transport_data_);
177 DCHECK(!dispatchers_); 177 DCHECK(!dispatchers_);
178 178
179 transport_data_ = transport_data.Pass(); 179 transport_data_ = transport_data.Pass();
180 UpdateTotalSize();
180 } 181 }
181 182
182 void MessageInTransit::SerializeAndCloseDispatchers(Channel* channel) { 183 void MessageInTransit::SerializeAndCloseDispatchers(Channel* channel) {
183 DCHECK(channel); 184 DCHECK(channel);
184 DCHECK(!transport_data_); 185 DCHECK(!transport_data_);
185 186
186 if (!dispatchers_ || !dispatchers_->size()) 187 if (!dispatchers_ || !dispatchers_->size())
187 return; 188 return;
188 189
189 transport_data_.reset(new TransportData(dispatchers_.Pass(), channel)); 190 transport_data_.reset(new TransportData(dispatchers_.Pass(), channel));
(...skipping 23 matching lines...) Expand all
213 DCHECK_EQ(main_buffer_size_ % kMessageAlignment, 0u); 214 DCHECK_EQ(main_buffer_size_ % kMessageAlignment, 0u);
214 header()->total_size = static_cast<uint32_t>(main_buffer_size_); 215 header()->total_size = static_cast<uint32_t>(main_buffer_size_);
215 if (transport_data_) { 216 if (transport_data_) {
216 header()->total_size += 217 header()->total_size +=
217 static_cast<uint32_t>(transport_data_->buffer_size()); 218 static_cast<uint32_t>(transport_data_->buffer_size());
218 } 219 }
219 } 220 }
220 221
221 } // namespace system 222 } // namespace system
222 } // namespace mojo 223 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/incoming_endpoint.h ('k') | mojo/edk/system/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698