diff options
Diffstat (limited to 'chrome/browser/download/download_file.cc')
-rw-r--r-- | chrome/browser/download/download_file.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc index 70d733d..5d7b5e5c 100644 --- a/chrome/browser/download/download_file.cc +++ b/chrome/browser/download/download_file.cc @@ -23,6 +23,7 @@ #include "chrome/common/win_util.h" #include "chrome/common/win_safe_util.h" #include "googleurl/src/gurl.h" +#include "net/base/io_buffer.h" #include "net/base/net_util.h" #include "net/url_request/url_request_context.h" @@ -265,11 +266,11 @@ void DownloadFileManager::UpdateDownload(int id, DownloadBuffer* buffer) { DownloadFile* download = LookupDownload(id); for (size_t i = 0; i < contents.size(); ++i) { - char* data = contents[i].first; + net::IOBuffer* data = contents[i].first; const int data_len = contents[i].second; if (download) - download->AppendDataToFile(data, data_len); - delete [] data; + download->AppendDataToFile(data->data(), data_len); + data->Release(); } if (download) { |