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

Unified Diff: components/cronet/android/url_request_peer.cc

Issue 442803002: Remove explicit JNI references by adding UrlRequest.readFromUploadChannel callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Matt's comments. Created 6 years, 4 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: components/cronet/android/url_request_peer.cc
diff --git a/components/cronet/android/url_request_peer.cc b/components/cronet/android/url_request_peer.cc
index 37385cfab871deb427539d1783b9cac585b6eaab..e6f16f2ccf355427a6317a99bf4e2898118cfb9e 100644
--- a/components/cronet/android/url_request_peer.cc
+++ b/components/cronet/android/url_request_peer.cc
@@ -51,10 +51,9 @@ void URLRequestPeer::SetUploadContent(const char* bytes, int bytes_len) {
reader.Pass(), 0));
}
-void URLRequestPeer::SetUploadChannel(
- JNIEnv* env, jobject channel, int64 content_length) {
+void URLRequestPeer::SetUploadChannel(JNIEnv* env, int64 content_length) {
scoped_ptr<net::UploadElementReader> reader(
- new WrappedChannelElementReader(env, channel, content_length));
+ new WrappedChannelElementReader(delegate_, content_length));
upload_data_stream_.reset(net::UploadDataStream::CreateWithReader(
reader.Pass(), 0));
}

Powered by Google App Engine
This is Rietveld 408576698