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

Unified Diff: chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 11112022: Add DownloadControllerAndroid public interface for android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | content/browser/android/browser_jni_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
diff --git a/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc b/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
index 0f0a320320b3bb36d97e54a93deb2c9cc4b6970d..fca51b77704210d7d0111fa6f52b5eb7a7404005 100644
--- a/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -8,6 +8,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
+#include "content/public/browser/android/download_controller_android.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/invalidate_type.h"
@@ -30,6 +31,7 @@ using base::android::GetClass;
using base::android::GetMethodID;
using base::android::HasClass;
using base::android::ScopedJavaLocalRef;
+using content::DownloadControllerAndroid;
using content::DownloadItem;
using content::JavaScriptDialogCreator;
using content::RenderViewHost;
@@ -279,10 +281,8 @@ bool WebContentsDelegateAndroid::CanDownload(
int request_id,
const std::string& request_method) {
if (request_method == net::HttpRequestHeaders::kGetMethod) {
- // TODO(leandrogracia): re-enable this when calling DownloadController
- // doesn't introduce a DEPS layering violation.
- // DownloadController::GetInstance()->CreateGETDownload(
- // source, request_id);
+ DownloadControllerAndroid::Get()->CreateGETDownload(
+ source, request_id);
return false;
}
return true;
@@ -290,10 +290,8 @@ bool WebContentsDelegateAndroid::CanDownload(
void WebContentsDelegateAndroid::OnStartDownload(WebContents* source,
DownloadItem* download) {
- // TODO(leandrogracia): re-enable this when calling DownloadController
- // doesn't introduce a DEPS layering violation.
- // DownloadController::GetInstance()->OnPostDownloadStarted(
- // source, download);
+ DownloadControllerAndroid::Get()->OnPostDownloadStarted(
+ source, download);
joth 2012/10/12 18:55:13 I'd suggest deleting these 2 methods from here, pu
nilesh 2012/10/12 19:23:22 I assume the plan is to move everything out of thi
}
bool WebContentsDelegateAndroid::ShouldOverrideLoading(const GURL& url) {
« no previous file with comments | « no previous file | content/browser/android/browser_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698