diff options
Diffstat (limited to 'base/memory/ref_counted_memory.cc')
-rw-r--r-- | base/memory/ref_counted_memory.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/base/memory/ref_counted_memory.cc b/base/memory/ref_counted_memory.cc index b1deee1..477c941 100644 --- a/base/memory/ref_counted_memory.cc +++ b/base/memory/ref_counted_memory.cc @@ -37,6 +37,9 @@ RefCountedBytes::RefCountedBytes(const std::vector<unsigned char>& initializer) : data_(initializer) { } +RefCountedBytes::RefCountedBytes(const unsigned char* p, size_t size) + : data_(p, p + size) {} + RefCountedBytes* RefCountedBytes::TakeVector( std::vector<unsigned char>* to_destroy) { RefCountedBytes* bytes = new RefCountedBytes; |