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

Unified Diff: content/browser/download/download_resource_handler.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/download/download_resource_handler.cc
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index b7cd416e4b8d7d09d1d495b7c6000762e32b7c41..1abd9c54bb568d5c597f513a5ac736b0ad016de3 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -192,12 +192,12 @@ bool DownloadResourceHandler::OnResponseStarted(
}
std::string content_type_header;
- if (!response->head.headers ||
+ if (!response->head.headers.get() ||
!response->head.headers->GetMimeType(&content_type_header))
content_type_header = "";
info->original_mime_type = content_type_header;
- if (!response->head.headers ||
+ if (!response->head.headers.get() ||
!response->head.headers->EnumerateHeader(
NULL, "Accept-Ranges", &accept_ranges_)) {
accept_ranges_ = "";
@@ -243,7 +243,7 @@ bool DownloadResourceHandler::OnWillRead(int request_id, net::IOBuffer** buf,
int* buf_size, int min_size) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(buf && buf_size);
- DCHECK(!read_buffer_);
+ DCHECK(!read_buffer_.get());
*buf_size = min_size < 0 ? kReadBufSize : min_size;
last_buffer_size_ = *buf_size;
@@ -256,7 +256,7 @@ bool DownloadResourceHandler::OnWillRead(int request_id, net::IOBuffer** buf,
bool DownloadResourceHandler::OnReadCompleted(int request_id, int bytes_read,
bool* defer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DCHECK(read_buffer_);
+ DCHECK(read_buffer_.get());
base::TimeTicks now(base::TimeTicks::Now());
if (!last_read_time_.is_null()) {
@@ -275,7 +275,7 @@ bool DownloadResourceHandler::OnReadCompleted(int request_id, int bytes_read,
if (!bytes_read)
return true;
bytes_read_ += bytes_read;
- DCHECK(read_buffer_);
+ DCHECK(read_buffer_.get());
// Take the data ship it down the stream. If the stream is full, pause the
// request; the stream callback will resume it.
« no previous file with comments | « content/browser/dom_storage/dom_storage_message_filter.cc ('k') | content/browser/download/drag_download_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698