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

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

Issue 13649009: Android: Use a ResourceThrottle to intercept GET downloads. (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/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 0f6ccd668eb50acc0fd060424c92d27d1d37a133..1377afd29ddf11125d4f7894090218079f401544 100644
--- a/chrome/browser/android/chrome_web_contents_delegate_android.cc
+++ b/chrome/browser/android/chrome_web_contents_delegate_android.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
#include "chrome/browser/ui/media_stream_infobar_delegate.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/public/browser/android/download_controller_android.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
@@ -25,7 +24,6 @@
#include "content/public/common/file_chooser_params.h"
#include "content/public/common/page_transition_types.h"
#include "jni/ChromeWebContentsDelegateAndroid_jni.h"
-#include "net/http/http_request_headers.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_f.h"
@@ -228,22 +226,6 @@ ChromeWebContentsDelegateAndroid::GetJavaScriptDialogManager() {
return GetJavaScriptDialogManagerInstance();
}
-void ChromeWebContentsDelegateAndroid::CanDownload(
- content::RenderViewHost* source,
- int request_id,
- const std::string& request_method,
- const base::Callback<void(bool)>& callback) {
- if (request_method == net::HttpRequestHeaders::kGetMethod) {
- content::DownloadControllerAndroid::Get()->CreateGETDownload(
- source, request_id);
- callback.Run(false);
- }
- // DownloadControllerAndroid::OnPostDownloadStarted() is called for the
- // started download by the default DownloadUIController::Delegate
- // implementation.
- callback.Run(true);
-}
-
void ChromeWebContentsDelegateAndroid::DidNavigateToPendingEntry(
content::WebContents* source) {
navigation_start_time_ = base::TimeTicks::Now();

Powered by Google App Engine
This is Rietveld 408576698