From 11fc8374c043f5477de3d548ad7c9d5f1e6e42af Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 12 Apr 2018 13:00:51 +0530 Subject: [PATCH] Move DownloadUrlParameters from content/public to components/download https://chromium-review.googlesource.com/c/chromium/src/+/914232 --- atom/browser/api/atom_api_web_contents.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index c4e96e42b4ab..535413717f2f 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -71,6 +71,7 @@ #include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/common/view_messages.h" #include "content/public/browser/child_process_security_policy.h" +#include "content/public/browser/download_request_utils.h" #include "content/public/browser/favicon_status.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/navigation_details.h" @@ -1191,10 +1192,10 @@ void WebContents::DownloadURL(const GURL& url) { auto* browser_context = web_contents()->GetBrowserContext(); auto* download_manager = content::BrowserContext::GetDownloadManager(browser_context); - - download_manager->DownloadUrl( - download::DownloadUrlParameters::CreateForWebContentsMainFrame( + std::unique_ptr download_params( + content::DownloadRequestUtils::CreateDownloadForWebContentsMainFrame( web_contents(), url, NO_TRAFFIC_ANNOTATION_YET)); + download_manager->DownloadUrl(std::move(download_params)); } GURL WebContents::GetURL() const {