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

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

Issue 13609002: fix a problem that android cannot download files with basic authentication (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 f09ff68e59a6e8288f4b80abfcc5d627bdaf7917..be1dda6c9d8823fe37e9e68fe90d542c4d56407c 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -228,6 +228,7 @@ void DownloadRequestLimiter::CanDownloadOnIOThread(
int render_view_id,
int request_id,
const std::string& request_method,
+ bool has_auth,
const 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.
@@ -236,7 +237,7 @@ void DownloadRequestLimiter::CanDownloadOnIOThread(
BrowserThread::UI, FROM_HERE,
base::Bind(&DownloadRequestLimiter::CanDownload, this,
render_process_host_id, render_view_id, request_id,
- request_method, callback));
+ request_method, has_auth, callback));
}
DownloadRequestLimiter::TabDownloadState*
@@ -262,6 +263,7 @@ void DownloadRequestLimiter::CanDownload(int render_process_host_id,
int render_view_id,
int request_id,
const std::string& request_method,
+ bool has_auth,
const Callback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -277,12 +279,14 @@ void DownloadRequestLimiter::CanDownload(int render_process_host_id,
originating_contents,
request_id,
request_method,
+ has_auth,
callback);
}
void DownloadRequestLimiter::CanDownloadImpl(WebContents* originating_contents,
int request_id,
const std::string& request_method,
+ bool has_auth,
const Callback& callback) {
DCHECK(originating_contents);
@@ -293,7 +297,8 @@ void DownloadRequestLimiter::CanDownloadImpl(WebContents* originating_contents,
!originating_contents->GetDelegate()->CanDownload(
originating_contents->GetRenderViewHost(),
request_id,
- request_method)) {
+ request_method,
+ has_auth)) {
ScheduleNotification(callback, false);
return;
}

Powered by Google App Engine
This is Rietveld 408576698