Chromium Code Reviews| 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) { |