Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2040)

Unified Diff: chrome/browser/download/download_request_limiter.cc

Issue 286543002: Cleanup CanDownload WebContentsDelegate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android build hopefully Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 504af77997c078f8e9cc5e0b111bd19c117ebebc..74866617f821bf9a46b0d43d4c322dd41f4beb02 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -281,7 +281,7 @@ DownloadRequestLimiter::GetDownloadStatus(content::WebContents* web_contents) {
void DownloadRequestLimiter::CanDownloadOnIOThread(
int render_process_host_id,
int render_view_id,
- int request_id,
+ const GURL& url,
const std::string& request_method,
const Callback& callback) {
// This is invoked on the IO thread. Schedule the task to run on the UI
@@ -290,7 +290,7 @@ void DownloadRequestLimiter::CanDownloadOnIOThread(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&DownloadRequestLimiter::CanDownload, this,
- render_process_host_id, render_view_id, request_id,
+ render_process_host_id, render_view_id, url,
request_method, callback));
}
@@ -315,7 +315,7 @@ DownloadRequestLimiter::GetDownloadState(
void DownloadRequestLimiter::CanDownload(int render_process_host_id,
int render_view_id,
- int request_id,
+ const GURL& url,
const std::string& request_method,
const Callback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -341,13 +341,12 @@ void DownloadRequestLimiter::CanDownload(int render_process_host_id,
factory_.GetWeakPtr(),
render_process_host_id,
render_view_id,
- request_id,
request_method,
callback);
originating_contents->GetDelegate()->CanDownload(
originating_contents->GetRenderViewHost(),
- request_id,
+ url,
request_method,
can_download_callback);
}
@@ -355,7 +354,6 @@ void DownloadRequestLimiter::CanDownload(int render_process_host_id,
void DownloadRequestLimiter::OnCanDownloadDecided(
int render_process_host_id,
int render_view_id,
- int request_id,
const std::string& request_method,
const Callback& orig_callback, bool allow) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -367,7 +365,6 @@ void DownloadRequestLimiter::OnCanDownloadDecided(
}
CanDownloadImpl(originating_contents,
- request_id,
request_method,
orig_callback);
}
@@ -380,7 +377,6 @@ HostContentSettingsMap* DownloadRequestLimiter::GetContentSettings(
void DownloadRequestLimiter::CanDownloadImpl(
content::WebContents* originating_contents,
- int request_id,
const std::string& request_method,
const Callback& callback) {
DCHECK(originating_contents);
« no previous file with comments | « chrome/browser/download/download_request_limiter.h ('k') | chrome/browser/download/download_request_limiter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698