summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 18:17:13 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 18:17:13 +0000
commit0b1ed04aa570de0073ffd6789513c514882d36b4 (patch)
tree142db3480904a6c1c02b03010aad3eb6f6154b10 /chrome/browser/download/save_package.cc
parentabf354c8ca4767f40334916a04c6de6b4098bee3 (diff)
downloadchromium_src-0b1ed04aa570de0073ffd6789513c514882d36b4.zip
chromium_src-0b1ed04aa570de0073ffd6789513c514882d36b4.tar.gz
chromium_src-0b1ed04aa570de0073ffd6789513c514882d36b4.tar.bz2
Fix save file stuff to use scoped_refptr for refcounted params.
BUG=28083 TEST=existing Review URL: http://codereview.chromium.org/3966007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63748 0039d316-1c4b-4281-b951-d872f2087c98
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 a148f18..473a795 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.