make_scoped_refptr --> WrapRefCounted

This commit is contained in:
Samuel Attard 2017-12-18 11:23:02 +11:00 committed by Aleksei Kuzmin
parent 4666879f94
commit 12066a60f3
11 changed files with 26 additions and 26 deletions

View file

@ -144,7 +144,7 @@ int URLRequestAsarJob::ReadRawData(net::IOBuffer* dest, int dest_size) {
dest_size,
base::Bind(&URLRequestAsarJob::DidRead,
weak_ptr_factory_.GetWeakPtr(),
make_scoped_refptr(dest)));
WrapRefCounted(dest)));
if (rv >= 0) {
remaining_bytes_ -= rv;
DCHECK_GE(remaining_bytes_, 0);

View file

@ -444,7 +444,7 @@ bool AtomURLRequest::CopyAndPostBuffer(int bytes_read) {
// data is only a wrapper for the asynchronous response_read_buffer_.
// Make a deep copy of payload and transfer ownership to the UI thread.
auto buffer_copy = make_scoped_refptr(new net::IOBufferWithSize(bytes_read));
auto buffer_copy = WrapRefCounted(new net::IOBufferWithSize(bytes_read));
memcpy(buffer_copy->data(), response_read_buffer_->data(), bytes_read);
return content::BrowserThread::PostTask(

View file

@ -119,7 +119,7 @@ int URLRequestStreamJob::ReadRawData(net::IOBuffer* dest, int dest_size) {
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&URLRequestStreamJob::CopyMoreData, weak_factory_.GetWeakPtr(),
make_scoped_refptr(dest), dest_size));
WrapRefCounted(dest), dest_size));
return net::ERR_IO_PENDING;
}