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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 11028131: Shift passage of FileStream in downloads system to be by scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Al's comments. Created 8 years, 2 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/plugins/plugin_installer.cc ('k') | content/browser/download/base_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 1cff6df1aeec448330f4d791cb3e9a28d9f456ef..d464b68d97bea624ca442aed4f0642ab9a124769 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1349,12 +1349,13 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
const GURL& referrer =
params_.frame_url.is_empty() ? params_.page_url : params_.frame_url;
const GURL& url = params_.link_url;
- content::DownloadSaveInfo save_info;
- save_info.prompt_for_save_location = true;
+ scoped_ptr<content::DownloadSaveInfo> save_info(
+ new content::DownloadSaveInfo());
+ save_info->prompt_for_save_location = true;
DownloadManager* dlm = BrowserContext::GetDownloadManager(profile_);
scoped_ptr<DownloadUrlParameters> dl_params(
DownloadUrlParameters::FromWebContents(
- source_web_contents_, url, save_info));
+ source_web_contents_, url, save_info.Pass()));
dl_params->set_referrer(
content::Referrer(referrer, params_.referrer_policy));
dl_params->set_referrer_encoding(params_.frame_charset);
@@ -1369,8 +1370,9 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
const GURL& referrer =
params_.frame_url.is_empty() ? params_.page_url : params_.frame_url;
const GURL& url = params_.src_url;
- content::DownloadSaveInfo save_info;
- save_info.prompt_for_save_location = true;
+ scoped_ptr<content::DownloadSaveInfo> save_info(
+ new content::DownloadSaveInfo());
+ save_info->prompt_for_save_location = true;
int64 post_id = -1;
if (url == source_web_contents_->GetURL()) {
const NavigationEntry* entry =
@@ -1381,7 +1383,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
DownloadManager* dlm = BrowserContext::GetDownloadManager(profile_);
scoped_ptr<DownloadUrlParameters> dl_params(
DownloadUrlParameters::FromWebContents(
- source_web_contents_, url, save_info));
+ source_web_contents_, url, save_info.Pass()));
dl_params->set_referrer(
content::Referrer(referrer, params_.referrer_policy));
dl_params->set_post_id(post_id);
« no previous file with comments | « chrome/browser/plugins/plugin_installer.cc ('k') | content/browser/download/base_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698