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

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

Issue 1856073002: Coalesce small buffers in net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix javadoc 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 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 android.content.Context; 7 import android.content.Context;
8 import android.os.Build; 8 import android.os.Build;
9 import android.os.ConditionVariable; 9 import android.os.ConditionVariable;
10 import android.os.Handler; 10 import android.os.Handler;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 } 142 }
143 return new CronetUrlRequest(this, url, priority, callback, executor, requestAnnotations, 143 return new CronetUrlRequest(this, url, priority, callback, executor, requestAnnotations,
144 metricsCollectionEnabled, disableCache, disableConnectionMig ration); 144 metricsCollectionEnabled, disableCache, disableConnectionMig ration);
145 } 145 }
146 } 146 }
147 147
148 @Override 148 @Override
149 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea m.Callback callback, 149 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea m.Callback callback,
150 Executor executor, String httpMethod, List<Map.Entry<String, String> > requestHeaders, 150 Executor executor, String httpMethod, List<Map.Entry<String, String> > requestHeaders,
151 @BidirectionalStream.Builder.StreamPriority int priority) { 151 @BidirectionalStream.Builder.StreamPriority int priority, boolean di sableAutoFlush) {
152 synchronized (mLock) { 152 synchronized (mLock) {
153 checkHaveAdapter(); 153 checkHaveAdapter();
154 return new CronetBidirectionalStream( 154 return new CronetBidirectionalStream(this, url, priority, callback, executor,
155 this, url, priority, callback, executor, httpMethod, request Headers); 155 httpMethod, requestHeaders, disableAutoFlush);
156 } 156 }
157 } 157 }
158 158
159 @Override 159 @Override
160 public boolean isEnabled() { 160 public boolean isEnabled() {
161 return Build.VERSION.SDK_INT >= 14; 161 return Build.VERSION.SDK_INT >= 14;
162 } 162 }
163 163
164 @Override 164 @Override
165 public String getVersionString() { 165 public String getVersionString() {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 505 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
506 private native void nativeEnableNetworkQualityEstimator( 506 private native void nativeEnableNetworkQualityEstimator(
507 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp onses); 507 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp onses);
508 508
509 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 509 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
510 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld); 510 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld);
511 511
512 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 512 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
513 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should); 513 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should);
514 } 514 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698