summaryrefslogtreecommitdiffstats
path: root/android_webview/native
diff options
context:
space:
mode:
authornileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 04:51:12 +0000
committernileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 04:51:12 +0000
commit39a5f01ad80b8f2c8607ebd3c3585b854b205eaf (patch)
tree2889203b25a1903180c2c44ba20d815009439276 /android_webview/native
parenta692b63a052426d0b0d6437803b0d60f225f2a5f (diff)
downloadchromium_src-39a5f01ad80b8f2c8607ebd3c3585b854b205eaf.zip
chromium_src-39a5f01ad80b8f2c8607ebd3c3585b854b205eaf.tar.gz
chromium_src-39a5f01ad80b8f2c8607ebd3c3585b854b205eaf.tar.bz2
Return false in AwWebContentsDelegate::CanDownload
Android webview intercepts download in its resource dispatcher host delegate BUG= Review URL: https://chromiumcodereview.appspot.com/11821011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175708 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/native')
-rw-r--r--android_webview/native/aw_web_contents_delegate.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc
index fb9283e3..27847c4 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,