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

Unified Diff: ipc/ipc_message_utils.cc

Issue 1188923003: Stub in more IPC attachment brokering functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 5 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
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index f86022c691a09cded39dc2cd21928bcaca8b9646..dfed3eb28187bd8dbee4361b866289d7c5d695be 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -445,6 +445,35 @@ void ParamTraits<std::vector<bool> >::Log(const param_type& p, std::string* l) {
}
}
+void ParamTraits<IPC::BrokerableAttachment::AttachmentId>::Write(
+ Message* m,
+ const param_type& p) {
+ for (int i = 0; i < 4; ++i) {
+ m->WriteUInt32(p.nonce[i]);
+ }
+}
+
+bool ParamTraits<IPC::BrokerableAttachment::AttachmentId>::Read(
+ const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
+ for (int i = 0; i < 4; ++i) {
+ uint32_t temp;
+ if (!iter->ReadUInt32(&temp))
+ return false;
+ r->nonce[i] = temp;
+ }
+ return true;
+}
+
+void ParamTraits<IPC::BrokerableAttachment::AttachmentId>::Log(
+ const param_type& p,
+ std::string* l) {
+ for (int i = 0; i < 4; ++i) {
+ l->append(base::UintToString(p.nonce[i]));
+ }
+}
+
void ParamTraits<base::DictionaryValue>::Write(Message* m,
const param_type& p) {
WriteValue(m, &p, 0);

Powered by Google App Engine
This is Rietveld 408576698