| 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 2c6d28f796c97b1baf1b215f1c516ecfdf11e6e4..2aa3ab61815b660de14d14d75b86f404e9548eb5 100644
|
| --- a/chrome/browser/tab_contents/render_view_context_menu.cc
|
| +++ b/chrome/browser/tab_contents/render_view_context_menu.cc
|
| @@ -85,8 +85,14 @@
|
| #include "chrome/browser/chromeos/extensions/file_manager_util.h"
|
| #endif
|
|
|
| +using WebKit::WebContextMenuData;
|
| +using WebKit::WebMediaPlayerAction;
|
| +using WebKit::WebPluginAction;
|
| +using WebKit::WebString;
|
| +using WebKit::WebURL;
|
| using content::ChildProcessSecurityPolicy;
|
| using content::DownloadManager;
|
| +using content::DownloadUrlParameters;
|
| using content::NavigationController;
|
| using content::NavigationEntry;
|
| using content::OpenURLParams;
|
| @@ -94,11 +100,6 @@ using content::RenderViewHost;
|
| using content::SSLStatus;
|
| using content::UserMetricsAction;
|
| using content::WebContents;
|
| -using WebKit::WebContextMenuData;
|
| -using WebKit::WebMediaPlayerAction;
|
| -using WebKit::WebPluginAction;
|
| -using WebKit::WebURL;
|
| -using WebKit::WebString;
|
|
|
| namespace {
|
|
|
| @@ -1510,14 +1511,11 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
|
| save_info.prompt_for_save_location = true;
|
| DownloadManager* dlm =
|
| DownloadServiceFactory::GetForProfile(profile_)->GetDownloadManager();
|
| - dlm->DownloadUrl(url,
|
| - referrer,
|
| - params_.frame_charset,
|
| - false, // Don't prefer_cache
|
| - -1, // No POST id
|
| - save_info,
|
| - source_web_contents_,
|
| - DownloadManager::OnStartedCallback());
|
| + DownloadUrlParameters* dl_params = DownloadUrlParameters::FromWebContents(
|
| + source_web_contents_, url, save_info);
|
| + dl_params->set_referrer(referrer);
|
| + dl_params->set_referrer_encoding(params_.frame_charset);
|
| + dlm->DownloadUrl(dl_params);
|
| break;
|
| }
|
|
|
| @@ -1539,14 +1537,11 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
|
| }
|
| DownloadManager* dlm =
|
| DownloadServiceFactory::GetForProfile(profile_)->GetDownloadManager();
|
| - dlm->DownloadUrl(url,
|
| - referrer,
|
| - "",
|
| - true, // prefer_cache
|
| - post_id,
|
| - save_info,
|
| - source_web_contents_,
|
| - DownloadManager::OnStartedCallback());
|
| + DownloadUrlParameters* dl_params = DownloadUrlParameters::FromWebContents(
|
| + source_web_contents_, url, save_info);
|
| + dl_params->set_referrer(referrer);
|
| + dl_params->set_post_id(post_id);
|
| + dlm->DownloadUrl(dl_params);
|
| break;
|
| }
|
|
|
|
|