Chromium Code Reviews| Index: base/pickle.h |
| diff --git a/base/pickle.h b/base/pickle.h |
| index 72b33ddc979a50a3f8fc0ecbd628889212f99a78..ecffc6380068da259ef53c111b195431ddeeee70 100644 |
| --- a/base/pickle.h |
| +++ b/base/pickle.h |
| @@ -258,6 +258,11 @@ class BASE_EXPORT Pickle { |
| // of the header. |
| void Resize(size_t new_capacity); |
| + // Claims |num_bytes| bytes of payload. This is similar to Reserve() in that |
| + // it may grow the capacity, but it also advances the write offset of the |
| + // pickle by |num_bytes|. Claimed memory, including padding, is zeroed. |
| + void* ClaimBytes(size_t num_bytes); |
|
Lei Zhang
2015/12/16 01:46:15
Can you document the return value?
Ken Rockot(use gerrit already)
2015/12/16 01:53:41
Done
|
| + |
| // Find the end of the pickled data that starts at range_start. Returns NULL |
| // if the entire Pickle is not found in the given data range. |
| static const char* FindNext(size_t header_size, |
| @@ -299,6 +304,8 @@ class BASE_EXPORT Pickle { |
| WriteBytesStatic<sizeof(data)>(&data); |
| return true; |
| } |
| + |
| + inline void* ClaimUninitializedBytesInternal(size_t num_bytes); |
| inline void WriteBytesCommon(const void* data, size_t length); |
| FRIEND_TEST_ALL_PREFIXES(PickleTest, DeepCopyResize); |