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

Unified Diff: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java

Issue 1928753002: Increase buffer size in CronetFixedModeOutputStream to 16kB (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java
diff --git a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java
index e73e820f85db4262f50c2a2c3992ec6b1a8dbaa9..f6e005335ae4104e6bf1b8444324ce89999908fb 100644
--- a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java
+++ b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java
@@ -23,12 +23,10 @@ import java.nio.ByteBuffer;
final class CronetFixedModeOutputStream extends CronetOutputStream {
// CronetFixedModeOutputStream buffers up to this value and wait for UploadDataStream
// to consume the data. This field is non-final, so it can be changed for tests.
- // Using 2048 bytes is because the internal read buffer is 14520 for QUIC,
- // 2852 for SPDY, and 16384 for normal stream. If a large value is used
- // here, the buffer might not fit the internal buffer and compacting the buffer
- // will be costly, see #read method below.
+ // Using 16384 bytes is because the internal read buffer is 14520 for QUIC,
+ // 16384 for SPDY, and 16384 for normal HTTP/1.1 stream.
@VisibleForTesting
- private static int sDefaultBufferLength = 2048;
+ private static int sDefaultBufferLength = 16384;
private final CronetHttpURLConnection mConnection;
private final MessageLoop mMessageLoop;
private final long mContentLength;
« no previous file with comments | « no previous file | components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698