Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: chrome/browser/download/download_file.cc

Issue 18390: Change URLRequest to use a ref-counted buffer for actual IO.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_file.h ('k') | chrome/browser/download/save_file_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_file.cc
===================================================================
--- chrome/browser/download/download_file.cc (revision 8565)
+++ 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) {
« no previous file with comments | « chrome/browser/download/download_file.h ('k') | chrome/browser/download/save_file_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698