| Index: chrome/browser/download/download_extension_api.cc
|
| diff --git a/chrome/browser/download/download_extension_api.cc b/chrome/browser/download/download_extension_api.cc
|
| index 3a382591be7789f937d7ca4162ad07be07100765..9463c5c4a4effd64b7dd5104ecc6b35a63bfe70f 100644
|
| --- a/chrome/browser/download/download_extension_api.cc
|
| +++ b/chrome/browser/download/download_extension_api.cc
|
| @@ -256,7 +256,8 @@ void DownloadsDownloadFunction::BeginDownloadOnIOThread() {
|
| // TODO(benjhayden) Ensure that this filename is interpreted as a path
|
| // relative to the default downloads directory without allowing '..'.
|
| save_info.suggested_name = iodata_->filename;
|
| - net::URLRequest* request = new net::URLRequest(iodata_->url, iodata_->rdh);
|
| + scoped_ptr<net::URLRequest> request(
|
| + new net::URLRequest(iodata_->url, iodata_->rdh));
|
| request->set_method(iodata_->method);
|
| if (iodata_->extra_headers != NULL) {
|
| for (size_t index = 0; index < iodata_->extra_headers->GetSize(); ++index) {
|
| @@ -273,7 +274,7 @@ void DownloadsDownloadFunction::BeginDownloadOnIOThread() {
|
| iodata_->post_body.size());
|
| }
|
| iodata_->rdh->BeginDownload(
|
| - request,
|
| + request.Pass(),
|
| save_info,
|
| iodata_->save_as,
|
| base::Bind(&DownloadsDownloadFunction::OnStarted, this),
|
|
|