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

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

Issue 2083893002: Move ChromeOS/Android checking for legacy protocol to build files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/edk/system/BUILD.gn ('k') | 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 c3fb77bc906185a1547bed64b5249a90700d8bde..aa6d70c3a2cfa5920ff41f0bc0e71fd9b70d99a3 100644
--- a/mojo/edk/system/channel.h
+++ b/mojo/edk/system/channel.h
@@ -45,7 +45,7 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
// Message size in bytes, including the header.
uint32_t num_bytes;
-#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
+#if defined(MOJO_EDK_LEGACY_PROTOCOL)
// 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) || defined(OS_ANDROID)
+#endif // defined(MOJO_EDK_LEGACY_PROTOCOL)
};
#if defined(OS_MACOSX) && !defined(OS_IOS)
@@ -116,7 +116,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) || defined(OS_ANDROID)
+#if defined(MOJO_EDK_LEGACY_PROTOCOL)
void* mutable_payload() { return static_cast<void*>(header_ + 1); }
const void* payload() const {
return static_cast<const void*>(header_ + 1);
@@ -132,7 +132,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) || defined(OS_ANDROID)
+#endif // defined(MOJO_EDK_LEGACY_PROTOCOL)
size_t num_handles() const { return header_->num_handles; }
bool has_handles() const { return header_->num_handles > 0; }
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698