summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/save_package.cc')
-rw-r--r--chrome/browser/download/save_package.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 4ce3e36..071e95b 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -1025,8 +1025,7 @@ void SavePackage::OnReceivedSerializedHtmlData(const GURL& frame_url,
if (!data.empty()) {
// Prepare buffer for saving HTML data.
- net::IOBuffer* new_data = new net::IOBuffer(data.size());
- new_data->AddRef(); // We'll pass the buffer to SaveFileManager.
+ scoped_refptr<net::IOBuffer> new_data = new net::IOBuffer(data.size());
memcpy(new_data->data(), data.data(), data.size());
// Call write file functionality in file thread.