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

Unified Diff: content/browser/byte_stream.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « content/browser/byte_stream.h ('k') | content/browser/byte_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/byte_stream.cc
diff --git a/content/browser/byte_stream.cc b/content/browser/byte_stream.cc
index 0a8939ed349900751ba4a9f6e82a4a272178a65d..1c70739a9f4171f248d87f1b4d0c322f7ad0fd39 100644
--- a/content/browser/byte_stream.cc
+++ b/content/browser/byte_stream.cc
@@ -126,21 +126,19 @@ class ByteStreamReaderImpl : public ByteStreamReader {
// static because it may be called after the object it is targeting
// has been destroyed. It may not access |*target|
// if |*object_lifetime_flag| is false.
- static void TransferData(
- scoped_refptr<LifetimeFlag> object_lifetime_flag,
- ByteStreamReaderImpl* target,
- scoped_ptr<ContentVector> transfer_buffer,
- size_t transfer_buffer_bytes,
- bool source_complete,
- int status);
+ static void TransferData(scoped_refptr<LifetimeFlag> object_lifetime_flag,
+ ByteStreamReaderImpl* target,
+ std::unique_ptr<ContentVector> transfer_buffer,
+ size_t transfer_buffer_bytes,
+ bool source_complete,
+ int status);
private:
// Called from TransferData once object existence has been validated.
- void TransferDataInternal(
- scoped_ptr<ContentVector> transfer_buffer,
- size_t transfer_buffer_bytes,
- bool source_complete,
- int status);
+ void TransferDataInternal(std::unique_ptr<ContentVector> transfer_buffer,
+ size_t transfer_buffer_bytes,
+ bool source_complete,
+ int status);
void MaybeUpdateInput();
@@ -289,7 +287,7 @@ void ByteStreamWriterImpl::PostToPeer(bool complete, int status) {
// Valid contexts in which to call.
DCHECK(complete || 0 != input_contents_size_);
- scoped_ptr<ContentVector> transfer_buffer;
+ std::unique_ptr<ContentVector> transfer_buffer;
size_t buffer_size = 0;
if (0 != input_contents_size_) {
transfer_buffer.reset(new ContentVector);
@@ -377,7 +375,7 @@ void ByteStreamReaderImpl::RegisterCallback(
void ByteStreamReaderImpl::TransferData(
scoped_refptr<LifetimeFlag> object_lifetime_flag,
ByteStreamReaderImpl* target,
- scoped_ptr<ContentVector> transfer_buffer,
+ std::unique_ptr<ContentVector> transfer_buffer,
size_t buffer_size,
bool source_complete,
int status) {
@@ -389,7 +387,7 @@ void ByteStreamReaderImpl::TransferData(
}
void ByteStreamReaderImpl::TransferDataInternal(
- scoped_ptr<ContentVector> transfer_buffer,
+ std::unique_ptr<ContentVector> transfer_buffer,
size_t buffer_size,
bool source_complete,
int status) {
@@ -448,8 +446,8 @@ void CreateByteStream(
scoped_refptr<base::SequencedTaskRunner> input_task_runner,
scoped_refptr<base::SequencedTaskRunner> output_task_runner,
size_t buffer_size,
- scoped_ptr<ByteStreamWriter>* input,
- scoped_ptr<ByteStreamReader>* output) {
+ std::unique_ptr<ByteStreamWriter>* input,
+ std::unique_ptr<ByteStreamReader>* output) {
scoped_refptr<LifetimeFlag> input_flag(new LifetimeFlag());
scoped_refptr<LifetimeFlag> output_flag(new LifetimeFlag());
« no previous file with comments | « content/browser/byte_stream.h ('k') | content/browser/byte_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698