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

Unified Diff: content/browser/webui/url_data_manager_backend.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/webui/url_data_manager_backend.cc
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc
index ab964d0beea8ce224378229895bd35cebfad5124..4284f0e2f9a323bbe3b140a5dfc848a8dfd22112 100644
--- a/content/browser/webui/url_data_manager_backend.cc
+++ b/content/browser/webui/url_data_manager_backend.cc
@@ -246,7 +246,7 @@ int URLRequestChromeJob::GetResponseCode() const {
}
void URLRequestChromeJob::GetResponseInfo(net::HttpResponseInfo* info) {
- DCHECK(!info->headers);
+ DCHECK(!info->headers.get());
// Set the headers so that requests serviced by ChromeURLDataManager return a
// status code of 200. Without this they return a 0, which makes the status
// indistiguishable from other error types. Instant relies on getting a 200.
@@ -283,9 +283,9 @@ void URLRequestChromeJob::DataAvailable(base::RefCountedMemory* bytes) {
data_ = bytes;
int bytes_read;
- if (pending_buf_) {
+ if (pending_buf_.get()) {
CHECK(pending_buf_->data());
- CompleteRead(pending_buf_, pending_buf_size_, &bytes_read);
+ CompleteRead(pending_buf_.get(), pending_buf_size_, &bytes_read);
pending_buf_ = NULL;
NotifyReadComplete(bytes_read);
}
@@ -298,7 +298,7 @@ void URLRequestChromeJob::DataAvailable(base::RefCountedMemory* bytes) {
bool URLRequestChromeJob::ReadRawData(net::IOBuffer* buf, int buf_size,
int* bytes_read) {
- if (!data_) {
+ if (!data_.get()) {
SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
DCHECK(!pending_buf_.get());
CHECK(buf->data());
@@ -492,7 +492,7 @@ bool URLDataManagerBackend::StartRequest(const net::URLRequest* request,
if (i == data_sources_.end())
return false;
- URLDataSourceImpl* source = i->second;
+ URLDataSourceImpl* source = i->second.get();
if (!source->source()->ShouldServiceRequest(request))
return false;
« no previous file with comments | « content/browser/webui/shared_resources_data_source.cc ('k') | content/browser/webui/url_data_source_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698