Transfer memory ownership when stacking ExtentWriters.
The ExtentWriter implementations are meant to be stacked in a way that
the underlying extent writer can't be reused. Calling End() on the top
of the stack will call End() on every ExtentWriter.
This patch enforces this design decision in the interface transfering
the ownership of the ExtentWriter when stacking them using a unique_ptr
instead of a plain pointer.
Bug: 23604708
Test: Updated unittests.
Change-Id: Ie3b5b9cbb3058359c487a783f6fb3c0ac65bde00
5 files changed