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

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

Issue 227703012: Mojo: MessageInTransit clean-up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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.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_MESSAGE_IN_TRANSIT_H_ 5 #ifndef MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_
6 #define MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ 6 #define MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 uint32_t num_handles; 255 uint32_t num_handles;
256 }; 256 };
257 257
258 struct HandleTableEntry { 258 struct HandleTableEntry {
259 int32_t type; // From |Dispatcher::Type| (|kTypeUnknown| for "invalid"). 259 int32_t type; // From |Dispatcher::Type| (|kTypeUnknown| for "invalid").
260 uint32_t offset; // Relative to the start of the secondary buffer. 260 uint32_t offset; // Relative to the start of the secondary buffer.
261 uint32_t size; // (Not including any padding.) 261 uint32_t size; // (Not including any padding.)
262 uint32_t unused; 262 uint32_t unused;
263 }; 263 };
264 264
265 // The maximum possible size of a valid secondary buffer: for each handle, 265 // The maximum possible size of a valid secondary buffer.
Tom Sepez 2014/04/08 00:18:22 nit: truly pedantic individuals would say "... in
266 // there'll be a handle table entry and its serialized data.
267 static const size_t kMaxSecondaryBufferSize; 266 static const size_t kMaxSecondaryBufferSize;
268 267
269 // Validates the secondary buffer. Returns null on success, or a 268 // Validates the secondary buffer. Returns null on success, or a
270 // human-readable error message (meant for logging/debugging) on error. 269 // human-readable error message (meant for logging/debugging) on error.
271 static const char* ValidateSecondaryBuffer(size_t num_handles, 270 static const char* ValidateSecondaryBuffer(size_t num_handles,
272 const void* secondary_buffer, 271 const void* secondary_buffer,
273 size_t secondary_buffer_size); 272 size_t secondary_buffer_size);
274 273
275 const Header* header() const { 274 const Header* header() const {
276 return static_cast<const Header*>(main_buffer_); 275 return static_cast<const Header*>(main_buffer_);
(...skipping 20 matching lines...) Expand all
297 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|. 296 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|.
298 scoped_ptr<std::vector<embedder::PlatformHandle> > platform_handles_; 297 scoped_ptr<std::vector<embedder::PlatformHandle> > platform_handles_;
299 298
300 DISALLOW_COPY_AND_ASSIGN(MessageInTransit); 299 DISALLOW_COPY_AND_ASSIGN(MessageInTransit);
301 }; 300 };
302 301
303 } // namespace system 302 } // namespace system
304 } // namespace mojo 303 } // namespace mojo
305 304
306 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ 305 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698