| Index: chrome/browser/download/download_request_limiter.cc
|
| diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
|
| index 0a828a14aaa008e5fea3ab59b9b6591b37f09729..579c172c490d53ab5ac4f69b881b4964f6d28af1 100644
|
| --- a/chrome/browser/download/download_request_limiter.cc
|
| +++ b/chrome/browser/download/download_request_limiter.cc
|
| @@ -190,6 +190,7 @@ DownloadRequestLimiter::DownloadStatus
|
|
|
| void DownloadRequestLimiter::CanDownloadOnIOThread(int render_process_host_id,
|
| int render_view_id,
|
| + int request_id,
|
| Callback* callback) {
|
| // This is invoked on the IO thread. Schedule the task to run on the UI
|
| // thread so that we can query UI state.
|
| @@ -197,7 +198,8 @@ void DownloadRequestLimiter::CanDownloadOnIOThread(int render_process_host_id,
|
| BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
| NewRunnableMethod(this, &DownloadRequestLimiter::CanDownload,
|
| - render_process_host_id, render_view_id, callback));
|
| + render_process_host_id, render_view_id, request_id,
|
| + callback));
|
| }
|
|
|
| void DownloadRequestLimiter::OnUserGesture(TabContents* tab) {
|
| @@ -233,6 +235,7 @@ DownloadRequestLimiter::TabDownloadState* DownloadRequestLimiter::
|
|
|
| void DownloadRequestLimiter::CanDownload(int render_process_host_id,
|
| int render_view_id,
|
| + int request_id,
|
| Callback* callback) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| @@ -243,16 +246,17 @@ void DownloadRequestLimiter::CanDownload(int render_process_host_id,
|
| ScheduleNotification(callback, false);
|
| return;
|
| }
|
| - CanDownloadImpl(originating_tab, callback);
|
| + CanDownloadImpl(originating_tab, request_id, callback);
|
| }
|
|
|
| void DownloadRequestLimiter::CanDownloadImpl(
|
| TabContents* originating_tab,
|
| + int request_id,
|
| Callback* callback) {
|
| // FYI: Chrome Frame overrides CanDownload in ExternalTabContainer in order
|
| // to cancel the download operation in chrome and let the host browser
|
| // take care of it.
|
| - if (!originating_tab->CanDownload(callback->GetRequestId())) {
|
| + if (!originating_tab->CanDownload(request_id)) {
|
| ScheduleNotification(callback, false);
|
| return;
|
| }
|
|
|