Switch //services/device/hid to use base::RefCountedBytes
This patch changes //services/device/hid to use base::RefCountedBytes instead of net::IOBuffer and net::IOBufferWithSize. This has a couple advantages: 1) base::RefCountedBytes always has a size which means in a follow-up patch we can stop passing separate length parameters. 2) base::RefCountedBytes is convertable to and from an std::vector<uint8_t> which reduces the mismatch between the C++ and Mojo interfaces. 3) base::RefCountedBytes holds unsigned data which is more correct for managing buffers (operations on signed values lead to bugs). This patch makes as few changes as possible to effect this conversion. Follow-up patches will take more advantage of the above to further simplify the code. Change-Id: I290b0415f74c0551f52bd59120a3c6012315681d Reviewed-on: https://chromium-review.googlesource.com/798018 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by:Jun Cai <juncai@chromium.org> Cr-Commit-Position: refs/heads/master@{#524230}
Showing
Please register or sign in to comment