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

Unified Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 11821011: Return false in AwWebContentsDelegate::CanDownload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added NOTREACHED Created 7 years, 11 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
« no previous file with comments | « android_webview/browser/aw_download_manager_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_web_contents_delegate.cc
diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc
index fb9283e30d5568f122ec4f1e7ff115152ffa505e..27847c4668eb3c899dccc2f0f9b338a3cb1b7937 100644
--- a/android_webview/native/aw_web_contents_delegate.cc
+++ b/android_webview/native/aw_web_contents_delegate.cc
@@ -10,10 +10,8 @@
#include "base/android/scoped_java_ref.h"
#include "base/lazy_instance.h"
#include "base/message_loop.h"
-#include "content/public/browser/android/download_controller_android.h"
#include "content/public/browser/web_contents.h"
#include "jni/AwWebContentsDelegate_jni.h"
-#include "net/http/http_request_headers.h"
using base::android::AttachCurrentThread;
using base::android::ScopedJavaLocalRef;
@@ -57,16 +55,15 @@ void AwWebContentsDelegate::FindReply(WebContents* web_contents,
bool AwWebContentsDelegate::CanDownload(content::RenderViewHost* source,
int request_id,
const std::string& request_method) {
- if (request_method == net::HttpRequestHeaders::kGetMethod) {
- content::DownloadControllerAndroid::Get()->CreateGETDownload(
- source, request_id);
- }
+ // Android webview intercepts download in its resource dispatcher host
+ // delegate, so should not reach here.
+ NOTREACHED();
return false;
}
void AwWebContentsDelegate::OnStartDownload(WebContents* source,
content::DownloadItem* download) {
- NOTREACHED(); // We always return false in CanDownload.
+ NOTREACHED(); // Downloads are cancelled in ResourceDispatcherHostDelegate.
}
void AwWebContentsDelegate::AddNewContents(content::WebContents* source,
« no previous file with comments | « android_webview/browser/aw_download_manager_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698