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

Unified Diff: content/browser/streams/stream_url_request_job.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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: content/browser/streams/stream_url_request_job.cc
diff --git a/content/browser/streams/stream_url_request_job.cc b/content/browser/streams/stream_url_request_job.cc
index 4478d16018f96e792f3a8fd6fa1313a5cbf6a826..a49766768c60bc3502653ca830ad5dd1aeaf171a 100644
--- a/content/browser/streams/stream_url_request_job.cc
+++ b/content/browser/streams/stream_url_request_job.cc
@@ -44,7 +44,7 @@ StreamURLRequestJob::StreamURLRequestJob(
total_bytes_read_(0),
max_range_(0),
request_failed_(false) {
- DCHECK(stream_);
+ DCHECK(stream_.get());
stream_->SetReadObserver(this);
}
@@ -55,9 +55,10 @@ StreamURLRequestJob::~StreamURLRequestJob() {
void StreamURLRequestJob::OnDataAvailable(Stream* stream) {
// Clear the IO_PENDING status.
SetStatus(net::URLRequestStatus());
- if (pending_buffer_) {
+ if (pending_buffer_.get()) {
int bytes_read;
- stream_->ReadRawData(pending_buffer_, pending_buffer_size_, &bytes_read);
+ stream_->ReadRawData(
+ pending_buffer_.get(), pending_buffer_size_, &bytes_read);
// Clear the buffers before notifying the read is complete, so that it is
// safe for the observer to read.
@@ -234,7 +235,7 @@ void StreamURLRequestJob::HeadersCompleted(int status_code,
}
void StreamURLRequestJob::ClearStream() {
- if (stream_) {
+ if (stream_.get()) {
stream_->RemoveReadObserver(this);
stream_ = NULL;
}
« no previous file with comments | « content/browser/streams/stream_unittest.cc ('k') | content/browser/streams/stream_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698