| Index: chrome/browser/download/download_file.cc
|
| ===================================================================
|
| --- chrome/browser/download/download_file.cc (revision 8697)
|
| +++ chrome/browser/download/download_file.cc (working copy)
|
| @@ -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 @@
|
|
|
| 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) {
|
|
|