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

Unified Diff: android_webview/native/intercepted_request_data_impl.h

Issue 11363123: [android_webview] Don't block the IO thread when reading from an InputStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reinterpret_cast->static_cast Created 8 years, 1 month 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/native/intercepted_request_data_impl.h
diff --git a/android_webview/native/intercepted_request_data_impl.h b/android_webview/native/intercepted_request_data_impl.h
index ecafaa76b4dd0577260900c25ba5cdfc6036456a..457bda94b56d4c2c887a7c85eec020db4a10291e 100644
--- a/android_webview/native/intercepted_request_data_impl.h
+++ b/android_webview/native/intercepted_request_data_impl.h
@@ -8,9 +8,12 @@
#include "android_webview/browser/intercepted_request_data.h"
#include "base/android/scoped_java_ref.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
namespace android_webview {
+class InputStream;
+
class InterceptedRequestDataImpl : public InterceptedRequestData {
public:
// It is expected that |obj| is an instance of the Java-side
@@ -18,8 +21,7 @@ class InterceptedRequestDataImpl : public InterceptedRequestData {
InterceptedRequestDataImpl(const base::android::JavaRef<jobject>& obj);
virtual ~InterceptedRequestDataImpl();
- virtual base::android::ScopedJavaLocalRef<jobject>
- GetInputStream(JNIEnv* env) const;
+ virtual scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const;
virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const;
virtual bool GetCharset(JNIEnv* env, std::string* charset) const;

Powered by Google App Engine
This is Rietveld 408576698