summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_file_manager.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-24 02:39:54 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-24 02:39:54 +0000
commite993abfe81feaa374d476828a44942d296bdcc78 (patch)
tree201fffef0ba93ce41afaf2bd6e61e05b61c04028 /chrome/browser/download/save_file_manager.cc
parent0afe80d755b899c188313629ea3f45f0fe5be981 (diff)
downloadchromium_src-e993abfe81feaa374d476828a44942d296bdcc78.zip
chromium_src-e993abfe81feaa374d476828a44942d296bdcc78.tar.gz
chromium_src-e993abfe81feaa374d476828a44942d296bdcc78.tar.bz2
revert r8603
Review URL: http://codereview.chromium.org/18576 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_file_manager.cc')
-rw-r--r--chrome/browser/download/save_file_manager.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/download/save_file_manager.cc b/chrome/browser/download/save_file_manager.cc
index 64984de..fbf5782 100644
--- a/chrome/browser/download/save_file_manager.cc
+++ b/chrome/browser/download/save_file_manager.cc
@@ -25,7 +25,6 @@
#include "chrome/common/win_safe_util.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
-#include "net/base/io_buffer.h"
#include "net/url_request/url_request_context.h"
SaveFileManager::SaveFileManager(MessageLoop* ui_loop,
@@ -272,12 +271,12 @@ void SaveFileManager::StartSave(SaveFileCreateInfo* info) {
// thread). We may receive a few more updates before the IO thread gets the
// cancel message. We just delete the data since the SaveFile has been deleted.
void SaveFileManager::UpdateSaveProgress(int save_id,
- net::IOBuffer* data,
+ char* data,
int data_len) {
DCHECK(MessageLoop::current() == GetSaveLoop());
SaveFile* save_file = LookupSaveFile(save_id);
if (save_file) {
- bool write_success = save_file->AppendDataToFile(data->data(), data_len);
+ bool write_success = save_file->AppendDataToFile(data, data_len);
ui_loop_->PostTask(FROM_HERE,
NewRunnableMethod(this,
&SaveFileManager::OnUpdateSaveProgress,
@@ -285,7 +284,7 @@ void SaveFileManager::UpdateSaveProgress(int save_id,
save_file->bytes_so_far(),
write_success));
}
- data->Release();
+ delete [] data;
}
// The IO thread will call this when saving is completed or it got error when