| 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 7c87a6f10c9cd44df4046e405e3c6f6b57d1a773..a4cc708dfa08d25df31426efcec4dc5af13d0dea 100644
|
| --- a/chrome/browser/extensions/api/downloads/downloads_api.cc
|
| +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
|
| @@ -63,8 +63,7 @@
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/render_widget_host_view.h"
|
| -#include "content/public/browser/resource_context.h"
|
| -#include "content/public/browser/resource_dispatcher_host.h"
|
| +#include "content/public/browser/storage_partition.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "extensions/browser/event_router.h"
|
| #include "extensions/browser/extension_function_dispatcher.h"
|
| @@ -957,12 +956,16 @@ bool DownloadsDownloadFunction::RunAsync() {
|
| if (include_incognito() && GetProfile()->HasOffTheRecordProfile())
|
| current_profile = GetProfile()->GetOffTheRecordProfile();
|
|
|
| + content::StoragePartition* storage_partition =
|
| + BrowserContext::GetStoragePartition(
|
| + render_frame_host()->GetProcess()->GetBrowserContext(),
|
| + render_frame_host()->GetSiteInstance());
|
| std::unique_ptr<content::DownloadUrlParameters> download_params(
|
| new content::DownloadUrlParameters(
|
| download_url, render_frame_host()->GetProcess()->GetID(),
|
| render_view_host_do_not_use()->GetRoutingID(),
|
| render_frame_host()->GetRoutingID(),
|
| - current_profile->GetResourceContext()));
|
| + storage_partition->GetURLRequestContext()));
|
|
|
| base::FilePath creator_suggested_filename;
|
| if (options.filename.get()) {
|
|
|