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

Unified Diff: chrome/browser/android/chrome_web_contents_delegate_android.cc

Issue 13037003: permissionrequest API for guest Download. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync @tott 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/android/chrome_web_contents_delegate_android.cc
diff --git a/chrome/browser/android/chrome_web_contents_delegate_android.cc b/chrome/browser/android/chrome_web_contents_delegate_android.cc
index 56f993d5ba30e2dca8e4308b2b891dbe94b6e969..0f6ccd668eb50acc0fd060424c92d27d1d37a133 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(
« no previous file with comments | « chrome/browser/android/chrome_web_contents_delegate_android.h ('k') | chrome/browser/download/download_request_limiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698