summaryrefslogtreecommitdiffstats
path: root/chrome/browser/android/chrome_web_contents_delegate_android.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/android/chrome_web_contents_delegate_android.cc')
-rw-r--r--chrome/browser/android/chrome_web_contents_delegate_android.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/android/chrome_web_contents_delegate_android.cc b/chrome/browser/android/chrome_web_contents_delegate_android.cc
index 56f993d..0f6ccd6 100644
--- a/chrome/browser/android/chrome_web_contents_delegate_android.cc
+++ b/chrome/browser/android/chrome_web_contents_delegate_android.cc
@@ -228,19 +228,20 @@ ChromeWebContentsDelegateAndroid::GetJavaScriptDialogManager() {
return GetJavaScriptDialogManagerInstance();
}
-bool ChromeWebContentsDelegateAndroid::CanDownload(
+void ChromeWebContentsDelegateAndroid::CanDownload(
content::RenderViewHost* source,
int request_id,
- const std::string& request_method) {
+ const std::string& request_method,
+ const base::Callback<void(bool)>& callback) {
if (request_method == net::HttpRequestHeaders::kGetMethod) {
content::DownloadControllerAndroid::Get()->CreateGETDownload(
source, request_id);
- return false;
+ callback.Run(false);
}
// DownloadControllerAndroid::OnPostDownloadStarted() is called for the
// started download by the default DownloadUIController::Delegate
// implementation.
- return true;
+ callback.Run(true);
}
void ChromeWebContentsDelegateAndroid::DidNavigateToPendingEntry(