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

Unified Diff: mojo/system/message_in_transit.h

Issue 419973005: Convert WriteMessage...() to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/system/memory.h ('k') | mojo/system/message_in_transit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_in_transit.h
diff --git a/mojo/system/message_in_transit.h b/mojo/system/message_in_transit.h
index 5a4a614c1197872f4613ebd67ed5aaf1c7755842..82b9fdae24d7042e8445b008c20208904913e482 100644
--- a/mojo/system/message_in_transit.h
+++ b/mojo/system/message_in_transit.h
@@ -14,6 +14,7 @@
#include "base/memory/aligned_memory.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/system/dispatcher.h"
+#include "mojo/system/memory.h"
#include "mojo/system/system_impl_export.h"
namespace mojo {
@@ -134,6 +135,11 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
Subtype subtype,
uint32_t num_bytes,
const void* bytes);
+ // |bytes| should be valid (and non-null), unless |num_bytes| is zero.
+ MessageInTransit(Type type,
+ Subtype subtype,
+ uint32_t num_bytes,
+ UserPointer<const void> bytes);
// Constructs a |MessageInTransit| from a |View|.
explicit MessageInTransit(const View& message_view);
@@ -236,6 +242,9 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
}
Header* header() { return reinterpret_cast<Header*>(main_buffer_.get()); }
+ void ConstructorHelper(Type type,
+ Subtype subtype,
+ uint32_t num_bytes);
void UpdateTotalSize();
const size_t main_buffer_size_;
« no previous file with comments | « mojo/system/memory.h ('k') | mojo/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698