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

Unified Diff: content/browser/android/download_controller.cc

Issue 11103040: Upstream latest DownloadController changes 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/download_controller.cc
diff --git a/content/browser/android/download_controller.cc b/content/browser/android/download_controller.cc
index d16784759361f421fca9a88ff40559042655ff2e..1e1be21d2c1cc1342ce637c0cc113fe3c6e475bd 100644
--- a/content/browser/android/download_controller.cc
+++ b/content/browser/android/download_controller.cc
@@ -289,8 +289,9 @@ ScopedJavaLocalRef<jobject>
if (!web_contents)
return ScopedJavaLocalRef<jobject>();
- NOTIMPLEMENTED();
- return ScopedJavaLocalRef<jobject>();
+ ContentViewCore* view_core = web_contents->GetContentNativeView();
+ return view_core ? view_core->GetJavaObject() :
+ ScopedJavaLocalRef<jobject>();
}
DownloadController::JavaObject* DownloadController::GetJavaObject() {
@@ -315,7 +316,7 @@ DownloadController::JavaObject* DownloadController::GetJavaObject() {
DownloadController::DownloadInfoAndroid::DownloadInfoAndroid(
net::URLRequest* request) {
request->GetResponseHeaderByName("content-disposition", &content_disposition);
- request->GetResponseHeaderByName("mime-type", &original_mime_type);
+ request->GetMimeType(&original_mime_type);
request->extra_request_headers().GetHeader(
net::HttpRequestHeaders::kUserAgent, &user_agent);
GURL referer_url(request->GetSanitizedReferrer());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698