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

Side by Side Diff: components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequest.java

Issue 367763004: WIP: Some cronet modifications for the AndroidGSA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Second attempt on UploadChannel Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import java.io.IOException; 7 import java.io.IOException;
8 import java.nio.ByteBuffer; 8 import java.nio.ByteBuffer;
9 import java.nio.channels.WritableByteChannel; 9 import java.nio.channels.WritableByteChannel;
10 import java.util.Map; 10 import java.util.Map;
11 11
12 /** 12 /**
13 * Network request using the native http stack implementation. 13 * Network request using the native http stack implementation.
14 */ 14 */
15 class ChromiumUrlRequest extends UrlRequest implements HttpUrlRequest { 15 public class ChromiumUrlRequest extends UrlRequest implements HttpUrlRequest {
16 16
17 private final HttpUrlRequestListener mListener; 17 private final HttpUrlRequestListener mListener;
18 18
19 private boolean mBufferFullResponse; 19 private boolean mBufferFullResponse;
20 20
21 private long mOffset; 21 private long mOffset;
22 22
23 private long mContentLength; 23 private long mContentLength;
24 24
25 private long mContentLengthLimit; 25 private long mContentLengthLimit;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 @Override 180 @Override
181 public ByteBuffer getByteBuffer() { 181 public ByteBuffer getByteBuffer() {
182 return ((ChunkedWritableByteChannel)getSink()).getByteBuffer(); 182 return ((ChunkedWritableByteChannel)getSink()).getByteBuffer();
183 } 183 }
184 184
185 @Override 185 @Override
186 public byte[] getResponseAsBytes() { 186 public byte[] getResponseAsBytes() {
187 return ((ChunkedWritableByteChannel)getSink()).getBytes(); 187 return ((ChunkedWritableByteChannel)getSink()).getBytes();
188 } 188 }
189 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698