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

Unified Diff: webkit/browser/blob/blob_url_request_job.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: webkit/browser/blob/blob_url_request_job.cc
diff --git a/webkit/browser/blob/blob_url_request_job.cc b/webkit/browser/blob/blob_url_request_job.cc
index 27d6686b1b82ea6e6df6d0040f6f81bc714ea6e8..66d9c42b55d4ea198b4255d92794043e8a3b026e 100644
--- a/webkit/browser/blob/blob_url_request_job.cc
+++ b/webkit/browser/blob/blob_url_request_job.cc
@@ -80,7 +80,7 @@ BlobURLRequestJob::BlobURLRequestJob(
error_(false),
headers_set_(false),
byte_range_set_(false) {
- DCHECK(file_thread_proxy_);
+ DCHECK(file_thread_proxy_.get());
}
void BlobURLRequestJob::Start() {
@@ -121,7 +121,7 @@ bool BlobURLRequestJob::ReadRawData(net::IOBuffer* dest,
}
// Keep track of the buffer.
- DCHECK(!read_buf_);
+ DCHECK(!read_buf_.get());
read_buf_ = new net::DrainableIOBuffer(dest, dest_size);
return ReadLoop(bytes_read);
@@ -178,7 +178,7 @@ void BlobURLRequestJob::DidStart() {
}
// If the blob data is not present, bail out.
- if (!blob_data_) {
+ if (!blob_data_.get()) {
NotifyFailure(net::ERR_FILE_NOT_FOUND);
return;
}
@@ -392,9 +392,9 @@ bool BlobURLRequestJob::ReadFileItem(FileStreamReader* reader,
DCHECK_GE(read_buf_->BytesRemaining(), bytes_to_read);
DCHECK(reader);
const int result = reader->Read(
- read_buf_, bytes_to_read,
- base::Bind(&BlobURLRequestJob::DidReadFile,
- base::Unretained(this)));
+ read_buf_.get(),
+ bytes_to_read,
+ base::Bind(&BlobURLRequestJob::DidReadFile, base::Unretained(this)));
if (result >= 0) {
// Data is immediately available.
if (GetStatus().is_io_pending())
@@ -585,11 +585,10 @@ void BlobURLRequestJob::CreateFileStreamReader(size_t index,
FileStreamReader* reader = NULL;
switch (item.type()) {
case BlobData::Item::TYPE_FILE:
- reader = new LocalFileStreamReader(
- file_thread_proxy_,
- item.path(),
- item.offset() + additional_offset,
- item.expected_modification_time());
+ reader = new LocalFileStreamReader(file_thread_proxy_.get(),
+ item.path(),
+ item.offset() + additional_offset,
+ item.expected_modification_time());
break;
case BlobData::Item::TYPE_FILE_FILESYSTEM:
reader = file_system_context_->CreateFileStreamReader(
« no previous file with comments | « webkit/browser/blob/blob_storage_controller_unittest.cc ('k') | webkit/browser/blob/blob_url_request_job_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698