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

Unified Diff: android_webview/browser/android_protocol_handler.cc

Issue 2889193004: [WebView] Replace AwContentsIoThreadClient, InputStream and AwWebResourceResponse (Closed)
Patch Set: fix test crash Created 3 years, 7 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: android_webview/browser/android_protocol_handler.cc
diff --git a/android_webview/browser/android_protocol_handler.cc b/android_webview/browser/android_protocol_handler.cc
index 2355206fadc5ddbec9d590f5516d844232583f53..f6c3b566732d7cf9138a2de8b005c43022412266 100644
--- a/android_webview/browser/android_protocol_handler.cc
+++ b/android_webview/browser/android_protocol_handler.cc
@@ -6,7 +6,7 @@
#include <utility>
-#include "android_webview/browser/input_stream_impl.h"
+#include "android_webview/browser/input_stream.h"
#include "android_webview/browser/net/android_stream_reader_url_request_job.h"
#include "android_webview/browser/net/aw_url_request_job_factory.h"
#include "android_webview/common/url_constants.h"
@@ -27,7 +27,7 @@
using android_webview::AndroidStreamReaderURLRequestJob;
using android_webview::InputStream;
-using android_webview::InputStreamImpl;
+using android_webview::InputStream;
using base::android::AttachCurrentThread;
using base::android::ClearException;
using base::android::ConvertUTF8ToJavaString;
@@ -120,7 +120,7 @@ AndroidStreamReaderURLRequestJobDelegateImpl::OpenInputStream(JNIEnv* env,
DLOG(ERROR) << "Unable to open input stream for Android URL";
return std::unique_ptr<InputStream>();
}
- return base::MakeUnique<InputStreamImpl>(stream);
+ return base::MakeUnique<InputStream>(stream);
}
void AndroidStreamReaderURLRequestJobDelegateImpl::OnInputStreamOpenFailed(
@@ -144,10 +144,9 @@ bool AndroidStreamReaderURLRequestJobDelegateImpl::GetMimeType(
// fail, as the mime type cannot be determined for all supported schemes.
ScopedJavaLocalRef<jstring> url =
ConvertUTF8ToJavaString(env, request->url().spec());
- const InputStreamImpl* stream_impl = InputStreamImpl::FromInputStream(stream);
ScopedJavaLocalRef<jstring> returned_type =
android_webview::Java_AndroidProtocolHandler_getMimeType(
- env, stream_impl->jobj(), url);
+ env, stream->jobj(), url);
if (returned_type.is_null())
return false;

Powered by Google App Engine
This is Rietveld 408576698