summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/save_file_resource_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/renderer_host/save_file_resource_handler.cc')
-rw-r--r--chrome/browser/renderer_host/save_file_resource_handler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/save_file_resource_handler.cc b/chrome/browser/renderer_host/save_file_resource_handler.cc
index 38f83bd..d33e205 100644
--- a/chrome/browser/renderer_host/save_file_resource_handler.cc
+++ b/chrome/browser/renderer_host/save_file_resource_handler.cc
@@ -80,8 +80,8 @@ bool SaveFileResourceHandler::OnWillRead(int request_id, net::IOBuffer** buf,
bool SaveFileResourceHandler::OnReadCompleted(int request_id, int* bytes_read) {
DCHECK(read_buffer_);
// We are passing ownership of this buffer to the save file manager.
- net::IOBuffer* buffer = NULL;
- read_buffer_.swap(&buffer);
+ scoped_refptr<net::IOBuffer> buffer;
+ read_buffer_.swap(buffer);
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(save_manager_,
@@ -115,3 +115,5 @@ void SaveFileResourceHandler::set_content_length(
const std::string& content_length) {
base::StringToInt64(content_length, &content_length_);
}
+
+SaveFileResourceHandler::~SaveFileResourceHandler() {}