Index: chrome/browser/extensions/api/downloads/downloads_api.cc |
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc |
index eb18822cf04f497497626e513326a484444c5062..5645a53ed2e52c660b808b4891065e93c4238d61 100644 |
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc |
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc |
@@ -578,7 +578,8 @@ bool DownloadsDownloadFunction::RunImpl() { |
return false; |
} |
- content::DownloadSaveInfo save_info; |
+ scoped_ptr<content::DownloadSaveInfo> save_info( |
+ new content::DownloadSaveInfo()); |
if (options.filename.get()) { |
// TODO(benjhayden): Make json_schema_compiler generate string16s instead of |
// std::strings. Can't get filename16 from options.ToValue() because that |
@@ -594,11 +595,11 @@ bool DownloadsDownloadFunction::RunImpl() { |
} |
// TODO(benjhayden) Ensure that this filename is interpreted as a path |
// relative to the default downloads directory without allowing '..'. |
- save_info.suggested_name = filename16; |
+ save_info->suggested_name = filename16; |
} |
if (options.save_as.get()) |
- save_info.prompt_for_save_location = *options.save_as.get(); |
+ save_info->prompt_for_save_location = *options.save_as.get(); |
Profile* current_profile = profile(); |
if (include_incognito() && profile()->HasOffTheRecordProfile()) |
@@ -610,7 +611,7 @@ bool DownloadsDownloadFunction::RunImpl() { |
render_view_host()->GetProcess()->GetID(), |
render_view_host()->GetRoutingID(), |
current_profile->GetResourceContext(), |
- save_info)); |
+ save_info.Pass())); |
if (options.headers.get()) { |
typedef extensions::api::downloads::HeaderNameValuePair HeaderNameValuePair; |