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

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

Issue 227133013: Mojo: Dispatcher::MessageInTransitAccess functions don't need to take the lock. (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 | « mojo/system/dispatcher.cc ('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 #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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: for each handle,
266 // there'll be a handle table entry and its serialized data. 266 // there'll be a handle table entry and its serialized data.
267 static const size_t kMaxSecondaryBufferSize; 267 static const size_t kMaxSecondaryBufferSize;
268 268
269 // Validates the secondary buffer. Returns null on success, or a 269 // Validates the secondary buffer. Returns null on success, or a
270 // human-readable error message on error. 270 // human-readable error message (meant for logging/debugging) on error.
271 static const char* ValidateSecondaryBuffer(size_t num_handles, 271 static const char* ValidateSecondaryBuffer(size_t num_handles,
272 const void* secondary_buffer, 272 const void* secondary_buffer,
273 size_t secondary_buffer_size); 273 size_t secondary_buffer_size);
274 274
275 const Header* header() const { 275 const Header* header() const {
276 return static_cast<const Header*>(main_buffer_); 276 return static_cast<const Header*>(main_buffer_);
277 } 277 }
278 Header* header() { return static_cast<Header*>(main_buffer_); } 278 Header* header() { return static_cast<Header*>(main_buffer_); }
279 279
280 void UpdateTotalSize(); 280 void UpdateTotalSize();
(...skipping 16 matching lines...) Expand all
297 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|. 297 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|.
298 scoped_ptr<std::vector<embedder::PlatformHandle> > platform_handles_; 298 scoped_ptr<std::vector<embedder::PlatformHandle> > platform_handles_;
299 299
300 DISALLOW_COPY_AND_ASSIGN(MessageInTransit); 300 DISALLOW_COPY_AND_ASSIGN(MessageInTransit);
301 }; 301 };
302 302
303 } // namespace system 303 } // namespace system
304 } // namespace mojo 304 } // namespace mojo
305 305
306 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_ 306 #endif // MOJO_SYSTEM_MESSAGE_IN_TRANSIT_H_
OLDNEW
« no previous file with comments | « mojo/system/dispatcher.cc ('k') | mojo/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698