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

Unified Diff: net/base/upload_file_element_reader.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 7 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 | « net/base/upload_data_stream_unittest.cc ('k') | net/base/upload_file_element_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_file_element_reader.cc
diff --git a/net/base/upload_file_element_reader.cc b/net/base/upload_file_element_reader.cc
index 611b8c031a1c74b26a1ea3820b0171b1f2f7c7c0..d1f2a12ac8cd13c6d5037032f13cdd98baf2ea03 100644
--- a/net/base/upload_file_element_reader.cc
+++ b/net/base/upload_file_element_reader.cc
@@ -94,7 +94,7 @@ int ReadInternal(scoped_refptr<IOBuffer> buf,
UploadFileElementReader::FileStreamDeleter::FileStreamDeleter(
base::TaskRunner* task_runner) : task_runner_(task_runner) {
- DCHECK(task_runner_);
+ DCHECK(task_runner_.get());
}
UploadFileElementReader::FileStreamDeleter::~FileStreamDeleter() {}
@@ -119,11 +119,11 @@ UploadFileElementReader::UploadFileElementReader(
range_offset_(range_offset),
range_length_(range_length),
expected_modification_time_(expected_modification_time),
- file_stream_(NULL, FileStreamDeleter(task_runner_)),
+ file_stream_(NULL, FileStreamDeleter(task_runner_.get())),
content_length_(0),
bytes_remaining_(0),
weak_ptr_factory_(this) {
- DCHECK(task_runner_);
+ DCHECK(task_runner_.get());
}
UploadFileElementReader::~UploadFileElementReader() {
@@ -138,10 +138,10 @@ int UploadFileElementReader::Init(const CompletionCallback& callback) {
Reset();
ScopedFileStreamPtr* file_stream =
- new ScopedFileStreamPtr(NULL, FileStreamDeleter(task_runner_));
+ new ScopedFileStreamPtr(NULL, FileStreamDeleter(task_runner_.get()));
uint64* content_length = new uint64;
const bool posted = base::PostTaskAndReplyWithResult(
- task_runner_,
+ task_runner_.get(),
FROM_HERE,
base::Bind(&InitInternal<FileStreamDeleter>,
path_,
@@ -182,7 +182,7 @@ int UploadFileElementReader::Read(IOBuffer* buf,
// Pass the ownership of file_stream_ to the worker pool to safely perform
// operation even when |this| is destructed before the read completes.
const bool posted = base::PostTaskAndReplyWithResult(
- task_runner_,
+ task_runner_.get(),
FROM_HERE,
base::Bind(&ReadInternal,
scoped_refptr<IOBuffer>(buf),
« no previous file with comments | « net/base/upload_data_stream_unittest.cc ('k') | net/base/upload_file_element_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698