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

Unified Diff: mojo/edk/system/channel.h

Issue 1775693002: [mojo-edk] Keep old wire format and semantics on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | mojo/edk/system/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel.h
diff --git a/mojo/edk/system/channel.h b/mojo/edk/system/channel.h
index 0d7ccdb613f591a8659dad663f3741a628e0a549..54b64121ef9a0c486a4e090eca26559655dd07d5 100644
--- a/mojo/edk/system/channel.h
+++ b/mojo/edk/system/channel.h
@@ -45,8 +45,8 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
// Message size in bytes, including the header.
uint32_t num_bytes;
-#if defined(OS_CHROMEOS)
- // Old message wire format for ChromeOS.
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
+ // Old message wire format for ChromeOS and Android.
// Number of attached handles.
uint16_t num_handles;
@@ -64,7 +64,7 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
MessageType message_type;
char padding[6];
-#endif // defined(OS_CHROMEOS)
+#endif // defined(OS_CHROMEOS) || defined(OS_ANDROID)
};
#pragma pack(pop)
@@ -82,7 +82,7 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
const void* data() const { return data_; }
size_t data_num_bytes() const { return size_; }
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
void* mutable_payload() { return static_cast<void*>(header_ + 1); }
const void* payload() const {
return static_cast<const void*>(header_ + 1);
@@ -98,7 +98,7 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
void* mutable_payload() { return data_ + header_->num_header_bytes; }
const void* payload() const { return data_ + header_->num_header_bytes; }
size_t payload_size() const;
-#endif // defined(OS_CHROMEOS)
+#endif // defined(OS_CHROMEOS) || defined(OS_ANDROID)
size_t num_handles() const { return header_->num_handles; }
bool has_handles() const { return header_->num_handles > 0; }
« no previous file with comments | « no previous file | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698