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

Unified Diff: ipc/ipc_message_utils.h

Issue 825353003: Revert of Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index d4c6268ba0f6fdff252f500c38130fe9cf8c076a..d18ab61cc09dab97eb734d7822f0f80e2556e4b4 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -117,7 +117,7 @@
m->WriteBool(p);
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
- return iter->ReadBool(r);
+ return m->ReadBool(iter, r);
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -145,7 +145,7 @@
m->WriteInt(p);
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
- return iter->ReadInt(r);
+ return m->ReadInt(iter, r);
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -157,7 +157,7 @@
m->WriteInt(p);
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
- return iter->ReadInt(reinterpret_cast<int*>(r));
+ return m->ReadInt(iter, reinterpret_cast<int*>(r));
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -169,7 +169,7 @@
m->WriteLongUsingDangerousNonPortableLessPersistableForm(p);
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
- return iter->ReadLong(r);
+ return m->ReadLong(iter, r);
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -181,7 +181,7 @@
m->WriteLongUsingDangerousNonPortableLessPersistableForm(p);
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
- return iter->ReadLong(reinterpret_cast<long*>(r));
+ return m->ReadLong(iter, reinterpret_cast<long*>(r));
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -194,7 +194,7 @@
}
static bool Read(const Message* m, PickleIterator* iter,
param_type* r) {
- return iter->ReadInt64(reinterpret_cast<int64*>(r));
+ return m->ReadInt64(iter, reinterpret_cast<int64*>(r));
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -207,7 +207,7 @@
}
static bool Read(const Message* m, PickleIterator* iter,
param_type* r) {
- return iter->ReadInt64(reinterpret_cast<int64*>(r));
+ return m->ReadInt64(iter, reinterpret_cast<int64*>(r));
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -222,7 +222,7 @@
m->WriteFloat(p);
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
- return iter->ReadFloat(r);
+ return m->ReadFloat(iter, r);
}
static void Log(const param_type& p, std::string* l);
};
@@ -245,7 +245,7 @@
}
static bool Read(const Message* m, PickleIterator* iter,
param_type* r) {
- return iter->ReadString(r);
+ return m->ReadString(iter, r);
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -258,7 +258,7 @@
}
static bool Read(const Message* m, PickleIterator* iter,
param_type* r) {
- return iter->ReadWString(r);
+ return m->ReadWString(iter, r);
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -274,7 +274,7 @@
}
static bool Read(const Message* m, PickleIterator* iter,
param_type* r) {
- return iter->ReadString16(r);
+ return m->ReadString16(iter, r);
}
IPC_EXPORT static void Log(const param_type& p, std::string* l);
};
@@ -316,7 +316,7 @@
param_type* r) {
int size;
// ReadLength() checks for < 0 itself.
- if (!iter->ReadLength(&size))
+ if (!m->ReadLength(iter, &size))
return false;
// Resizing beforehand is not safe, see BUG 1006367 for details.
if (INT_MAX / sizeof(P) <= static_cast<size_t>(size))
@@ -349,7 +349,7 @@
static bool Read(const Message* m, PickleIterator* iter,
param_type* r) {
int size;
- if (!iter->ReadLength(&size))
+ if (!m->ReadLength(iter, &size))
return false;
for (int i = 0; i < size; ++i) {
P item;
@@ -651,7 +651,7 @@
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
int size = 0;
- if (!iter->ReadLength(&size))
+ if (!m->ReadLength(iter, &size))
return false;
if (INT_MAX/sizeof(P) <= static_cast<size_t>(size))
return false;
@@ -690,7 +690,7 @@
}
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
int size;
- if (!iter->ReadLength(&size))
+ if (!m->ReadLength(iter, &size))
return false;
for (int i = 0; i < size; ++i) {
K key;
« no previous file with comments | « ipc/ipc_message.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698