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

Unified Diff: ipc/ipc_message.cc

Issue 1317093007: ipc: Make a new class PlaceholderBrokerableAttachment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More rebase errors. Created 5 years, 3 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 | « ipc/ipc_message.h ('k') | ipc/ipc_message_attachment_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message.cc
diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc
index cba89545f875ecd758a88331fee42f6dccc4d6db..99868a39ef71dbc90c9d30cabd94e79cc41e3daf 100644
--- a/ipc/ipc_message.cc
+++ b/ipc/ipc_message.cc
@@ -11,6 +11,7 @@
#include "build/build_config.h"
#include "ipc/ipc_message_attachment.h"
#include "ipc/ipc_message_attachment_set.h"
+#include "ipc/placeholder_brokerable_attachment.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
@@ -180,6 +181,13 @@ void Message::FindNext(const char* range_start,
info->message_found = true;
}
+bool Message::AddPlaceholderBrokerableAttachmentWithId(
+ BrokerableAttachment::AttachmentId id) {
+ scoped_refptr<PlaceholderBrokerableAttachment> attachment(
+ new PlaceholderBrokerableAttachment(id));
+ return attachment_set()->AddAttachment(attachment);
+}
+
bool Message::WriteAttachment(scoped_refptr<MessageAttachment> attachment) {
// We write the index of the descriptor so that we don't have to
// keep the current descriptor as extra decoding state when deserialising.
« no previous file with comments | « ipc/ipc_message.h ('k') | ipc/ipc_message_attachment_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698