| Index: content/browser/android/download_controller_android_impl.cc
|
| diff --git a/content/browser/android/download_controller_android_impl.cc b/content/browser/android/download_controller_android_impl.cc
|
| index be0b9018350d4c94026a1741fbcd453b6e6cddd1..c2d00e3b3c2fdaf09221000a65d9a9e059264ddd 100644
|
| --- a/content/browser/android/download_controller_android_impl.cc
|
| +++ b/content/browser/android/download_controller_android_impl.cc
|
| @@ -181,16 +181,10 @@ void DownloadControllerAndroidImpl::CancelDeferredDownload(
|
| }
|
|
|
| void DownloadControllerAndroidImpl::AcquireFileAccessPermission(
|
| - int render_process_id,
|
| - int render_view_id,
|
| + WebContents* web_contents,
|
| const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| - WebContents* web_contents = GetWebContents(render_process_id, render_view_id);
|
| - if (!web_contents) {
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE, base::Bind(cb, false));
|
| - return;
|
| - }
|
| + DCHECK(web_contents);
|
|
|
| ScopedJavaLocalRef<jobject> view =
|
| GetContentViewCoreFromWebContents(web_contents);
|
| @@ -354,7 +348,7 @@ void DownloadControllerAndroidImpl::StartAndroidDownload(
|
| }
|
|
|
| AcquireFileAccessPermission(
|
| - render_process_id, render_view_id,
|
| + web_contents,
|
| base::Bind(&DownloadControllerAndroidImpl::StartAndroidDownloadInternal,
|
| base::Unretained(this), render_process_id, render_view_id,
|
| info));
|
| @@ -530,9 +524,8 @@ void DownloadControllerAndroidImpl::StartContextMenuDownload(
|
| int process_id = web_contents->GetRenderProcessHost()->GetID();
|
| int routing_id = web_contents->GetRoutingID();
|
| AcquireFileAccessPermission(
|
| - process_id, routing_id,
|
| - base::Bind(&CreateContextMenuDownload, process_id, routing_id, params,
|
| - is_link, extra_headers));
|
| + web_contents, base::Bind(&CreateContextMenuDownload, process_id,
|
| + routing_id, params, is_link, extra_headers));
|
| }
|
|
|
| void DownloadControllerAndroidImpl::DangerousDownloadValidated(
|
|
|