Chromium Code Reviews| 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..8058f0c6e4f8b909b40395c07a608c0a1cdf1450 100644 |
| --- a/content/browser/android/download_controller_android_impl.cc |
| +++ b/content/browser/android/download_controller_android_impl.cc |
| @@ -181,11 +181,9 @@ 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) { |
|
davidben
2015/11/24 15:51:16
Nit: I'd probably have moved this into the caller.
clamy
2015/11/25 14:02:02
Done. Note that the caller now run the callback sy
|
| BrowserThread::PostTask( |
| BrowserThread::UI, FROM_HERE, base::Bind(cb, false)); |
| @@ -354,7 +352,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 +528,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( |