Commit 4a56735d authored by Min Qin's avatar Min Qin Committed by Commit Bot

Pass correct render_process_id and render_frame_id when begin context menu download

The values are not set correctly, causing some tests to fail

BUG=789081

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I9619e747ba87f376bddbd3bf9b5275e495d74fe0
Reviewed-on: https://chromium-review.googlesource.com/794012Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519782}
parent f5ef3526
......@@ -194,14 +194,16 @@ DownloadManagerImpl::UniqueUrlDownloadHandlerPtr BeginResourceDownload(
return nullptr;
}
ResourceRequestInfo::WebContentsGetter getter = base::Bind(
&GetWebContents, request->origin_pid, request->render_frame_id, -1);
// TODO(qinmin): Check the storage permission before creating the URLLoader.
// This is already done for context menu download, but it is missing for
// download service and download resumption.
return DownloadManagerImpl::UniqueUrlDownloadHandlerPtr(
ResourceDownloader::BeginDownload(
download_manager, std::move(params), std::move(request),
url_loader_factory_getter, file_system_context,
base::Bind(&GetWebContents, -1, -1, -1), download_id, false)
url_loader_factory_getter, file_system_context, getter, download_id,
false)
.release());
}
......@@ -713,7 +715,6 @@ DownloadInterruptReason DownloadManagerImpl::BeginDownloadRequest(
int render_view_route_id,
int render_frame_route_id,
bool do_not_prompt_for_login) {
LOG(ERROR) << "BeginDownloadRequest";
if (ResourceDispatcherHostImpl::Get()->is_shutdown())
return DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN;
......
......@@ -901,9 +901,4 @@
-NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.Prefetch301LoadFlags/0
-NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.Prefetch301LoadFlags/1
-NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchLoadFlag/0
-NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchLoadFlag/1
# Started failing after r519463
-SBNavigationObserverBrowserTest.DownloadViaHTML5FileApiWithoutUserGesture
-SBNavigationObserverBrowserTest.DownloadViaHTML5FileApiWithUserGesture
-DownloadTest.CloseNewTab4
-NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchLoadFlag/1
\ No newline at end of file
......@@ -233,8 +233,5 @@ crbug.com/778721 http/tests/fetch/workers/thorough/scheme-blob.html [ Pass Failu
crbug.com/721408 http/tests/inspector-protocol/network/navigation-xfer-size.js [ Failure ]
crbug.com/789081 fast/dom/HTMLAnchorElement/anchor-download.html [ Timeout ]
crbug.com/789081 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Timeout ]
# Started flaking after test was rewritten in r517585.
Bug(none) http/tests/devtools/service-workers/service-worker-agents.js [ Crash Pass ]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment