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

Unified Diff: content/browser/loader/certificate_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/loader/certificate_resource_handler.cc
diff --git a/content/browser/loader/certificate_resource_handler.cc b/content/browser/loader/certificate_resource_handler.cc
index 266b630c37b99e3cf86c24b6ca03ba8da441d8fa..af3d07542c343ee4eb6aefe8cc11667998fe40ae 100644
--- a/content/browser/loader/certificate_resource_handler.cc
+++ b/content/browser/loader/certificate_resource_handler.cc
@@ -68,7 +68,7 @@ bool CertificateResourceHandler::OnWillRead(int request_id,
// TODO(gauravsh): Should we use 'min_size' here?
DCHECK(buf && buf_size);
- if (!read_buffer_) {
+ if (!read_buffer_.get()) {
read_buffer_ = new net::IOBuffer(kReadBufSize);
}
*buf = read_buffer_.get();
@@ -84,7 +84,7 @@ bool CertificateResourceHandler::OnReadCompleted(int request_id,
return true;
// We have more data to read.
- DCHECK(read_buffer_);
+ DCHECK(read_buffer_.get());
content_length_ += bytes_read;
// Release the ownership of the buffer, and store a reference
@@ -107,7 +107,7 @@ bool CertificateResourceHandler::OnResponseCompleted(
AssembleResource();
const void* content_bytes = NULL;
- if (resource_buffer_)
+ if (resource_buffer_.get())
content_bytes = resource_buffer_->data();
// Note that it's up to the browser to verify that the certificate
@@ -132,7 +132,7 @@ void CertificateResourceHandler::AssembleResource() {
// Copy the data into it.
size_t bytes_copied = 0;
for (size_t i = 0; i < buffer_.size(); ++i) {
- net::IOBuffer* data = buffer_[i].first;
+ net::IOBuffer* data = buffer_[i].first.get();
size_t data_len = buffer_[i].second;
DCHECK(data != NULL);
DCHECK_LE(bytes_copied + data_len, content_length_);
« no previous file with comments | « content/browser/loader/buffered_resource_handler.cc ('k') | content/browser/loader/cross_site_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698