Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2780)

Unified Diff: base/memory/ref_counted_memory.h

Issue 1803263002: base: Make RefCountedBytes::TakeVector return ref ptr instead of raw ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/memory/ref_counted_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/ref_counted_memory.h
diff --git a/base/memory/ref_counted_memory.h b/base/memory/ref_counted_memory.h
index f37a86011af9f92063200b89e6105b6528f30c18..aa22c9e525bc5b72a32289f54db8dd7764facf6b 100644
--- a/base/memory/ref_counted_memory.h
+++ b/base/memory/ref_counted_memory.h
@@ -81,7 +81,8 @@ class BASE_EXPORT RefCountedBytes : public RefCountedMemory {
// Constructs a RefCountedBytes object by performing a swap. (To non
// destructively build a RefCountedBytes, use the constructor that takes a
// vector.)
- static RefCountedBytes* TakeVector(std::vector<unsigned char>* to_destroy);
+ static scoped_refptr<RefCountedBytes> TakeVector(
+ std::vector<unsigned char>* to_destroy);
// Overridden from RefCountedMemory:
const unsigned char* front() const override;
« no previous file with comments | « no previous file | base/memory/ref_counted_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698