Index: ipc/ipc_message.cc |
diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc |
index 75f628efc4df6fec7c59e145fd0d97b97600e62c..99868a39ef71dbc90c9d30cabd94e79cc41e3daf 100644 |
--- a/ipc/ipc_message.cc |
+++ b/ipc/ipc_message.cc |
@@ -49,9 +49,6 @@ |
Message::Message() : base::Pickle(sizeof(Header)) { |
header()->routing = header()->type = 0; |
header()->flags = GetRefNumUpper24(); |
-#if USE_ATTACHMENT_BROKER |
- header()->num_brokered_attachments = 0; |
-#endif |
#if defined(OS_POSIX) |
header()->num_fds = 0; |
header()->pad = 0; |
@@ -65,9 +62,6 @@ |
header()->type = type; |
DCHECK((priority & 0xffffff00) == 0); |
header()->flags = priority | GetRefNumUpper24(); |
-#if USE_ATTACHMENT_BROKER |
- header()->num_brokered_attachments = 0; |
-#endif |
#if defined(OS_POSIX) |
header()->num_fds = 0; |
header()->pad = 0; |
@@ -155,7 +149,7 @@ |
// The data is not copied. |
size_t pickle_len = static_cast<size_t>(pickle_end - range_start); |
Message message(range_start, static_cast<int>(pickle_len)); |
- size_t num_attachments = message.header()->num_brokered_attachments; |
+ int num_attachments = message.header()->num_brokered_attachments; |
// Check for possible overflows. |
size_t max_size_t = std::numeric_limits<size_t>::max(); |
@@ -171,7 +165,7 @@ |
if (buffer_length < attachment_length + pickle_len) |
return; |
- for (size_t i = 0; i < num_attachments; ++i) { |
+ for (int i = 0; i < num_attachments; ++i) { |
const char* attachment_start = |
pickle_end + i * BrokerableAttachment::kNonceSize; |
BrokerableAttachment::AttachmentId id(attachment_start, |
@@ -198,12 +192,6 @@ |
// We write the index of the descriptor so that we don't have to |
// keep the current descriptor as extra decoding state when deserialising. |
WriteInt(attachment_set()->size()); |
- |
-#if USE_ATTACHMENT_BROKER |
- if (attachment->GetType() == MessageAttachment::TYPE_BROKERABLE_ATTACHMENT) |
- header()->num_brokered_attachments += 1; |
-#endif |
- |
return attachment_set()->AddAttachment(attachment); |
} |