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

Unified Diff: ipc/ipc_channel.cc

Issue 1309003003: ipc: Add the inner class OutputElement to Channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_add_header3
Patch Set: Fix typo. 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_channel.h ('k') | ipc/ipc_channel_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.cc
diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc
index e659205ae6d290eab2b13aa07a270e3d56e6f335..6772e1c55794d1dec4b4df8392b07e73ca738e3e 100644
--- a/ipc/ipc_channel.cc
+++ b/ipc/ipc_channel.cc
@@ -43,4 +43,14 @@ std::string Channel::GenerateUniqueRandomChannelID() {
base::RandInt(0, std::numeric_limits<int32_t>::max()));
}
+Channel::OutputElement::OutputElement(Message* message)
+ : message_(message), buffer_(nullptr), length_(0) {}
+
+Channel::OutputElement::OutputElement(void* buffer, size_t length)
+ : message_(nullptr), buffer_(buffer), length_(length) {}
+
+Channel::OutputElement::~OutputElement() {
+ free(buffer_);
+}
+
} // namespace IPC
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698