| Index: base/pickle.h
|
| diff --git a/base/pickle.h b/base/pickle.h
|
| index 2420f756270df665b2f164a5b4ff630779889a0f..0eea49042f18696160ee5633774632c26fd00958 100644
|
| --- a/base/pickle.h
|
| +++ b/base/pickle.h
|
| @@ -168,9 +168,17 @@ class BASE_EXPORT Pickle {
|
| bool ReadString16(PickleIterator* iter, string16* result) const {
|
| return iter->ReadString16(result);
|
| }
|
| + // A pointer to the data will be placed in *data, and the length will be
|
| + // placed in *length. This buffer will be into the message's buffer so will
|
| + // be scoped to the lifetime of the message (or until the message data is
|
| + // mutated).
|
| bool ReadData(PickleIterator* iter, const char** data, int* length) const {
|
| return iter->ReadData(data, length);
|
| }
|
| + // A pointer to the data will be placed in *data. The caller specifies the
|
| + // number of bytes to read, and ReadBytes will validate this length. The
|
| + // returned buffer will be into the message's buffer so will be scoped to the
|
| + // lifetime of the message (or until the message data is mutated).
|
| bool ReadBytes(PickleIterator* iter, const char** data, int length) const {
|
| return iter->ReadBytes(data, length);
|
| }
|
| @@ -214,7 +222,12 @@ class BASE_EXPORT Pickle {
|
| bool WriteString(const std::string& value);
|
| bool WriteWString(const std::wstring& value);
|
| bool WriteString16(const string16& value);
|
| + // "Data" is a blob with a length. When you read it out you will be given the
|
| + // length. See also WriteBytes.
|
| bool WriteData(const char* data, int length);
|
| + // "Bytes" is a blob with no length. The caller must specify the lenght both
|
| + // when reading and writing. It is normally used to serialize PoD types of a
|
| + // known size. See also WriteData.
|
| bool WriteBytes(const void* data, int data_len);
|
|
|
| // Same as WriteData, but allows the caller to write directly into the
|
|
|