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

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

Issue 1992953004: [Cronet] Make delaying sending request headers explicit in bidirectional stream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correct a typo Created 4 years, 6 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 } 143 }
144 return new CronetUrlRequest(this, url, priority, callback, executor, requestAnnotations, 144 return new CronetUrlRequest(this, url, priority, callback, executor, requestAnnotations,
145 metricsCollectionEnabled, disableCache, disableConnectionMig ration); 145 metricsCollectionEnabled, disableCache, disableConnectionMig ration);
146 } 146 }
147 } 147 }
148 148
149 @Override 149 @Override
150 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea m.Callback callback, 150 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea m.Callback callback,
151 Executor executor, String httpMethod, List<Map.Entry<String, String> > requestHeaders, 151 Executor executor, String httpMethod, List<Map.Entry<String, String> > requestHeaders,
152 @BidirectionalStream.Builder.StreamPriority int priority, boolean di sableAutoFlush) { 152 @BidirectionalStream.Builder.StreamPriority int priority, boolean di sableAutoFlush,
153 boolean delayRequestHeadersUntilFirstFlush) {
153 synchronized (mLock) { 154 synchronized (mLock) {
154 checkHaveAdapter(); 155 checkHaveAdapter();
155 return new CronetBidirectionalStream(this, url, priority, callback, executor, 156 return new CronetBidirectionalStream(this, url, priority, callback, executor,
156 httpMethod, requestHeaders, disableAutoFlush); 157 httpMethod, requestHeaders, disableAutoFlush,
158 delayRequestHeadersUntilFirstFlush);
157 } 159 }
158 } 160 }
159 161
160 @Override 162 @Override
161 public boolean isEnabled() { 163 public boolean isEnabled() {
162 return Build.VERSION.SDK_INT >= 14; 164 return Build.VERSION.SDK_INT >= 14;
163 } 165 }
164 166
165 @Override 167 @Override
166 public String getVersionString() { 168 public String getVersionString() {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 508 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
507 private native void nativeEnableNetworkQualityEstimator( 509 private native void nativeEnableNetworkQualityEstimator(
508 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp onses); 510 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp onses);
509 511
510 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 512 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
511 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld); 513 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld);
512 514
513 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 515 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
514 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should); 516 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should);
515 } 517 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698