Increase usability of RefCountedBytes as a mutable buffer
This patch adds a new constructor for RefCountedBytes that initializes it with a given length of zeros and non-const versions of the front() and front_as<>() methods to accompany the non-const data() method. This is split out from https://crrev.com/c/786680 which uses this class as a replacement for net::IOBufferWithSize (but with an unsigned buffer). Change-Id: I36c16d02e0a524da3da8679b883321388febaf82 Reviewed-on: https://chromium-review.googlesource.com/822165Reviewed-by:Lei Zhang <thestig@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#524160}
Showing
Please register or sign in to comment