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

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

Issue 9150028: Cleanup: ResourceDispatcherHost::BeginDownload takes a scoped_ptr<URLRequest> argument. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/process_unique_id/child_id/ Created 8 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 | « no previous file | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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),
« no previous file with comments | « no previous file | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698