| OLD | NEW |
| 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.impl; | 5 package org.chromium.net.impl; |
| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 176 } |
| 177 return new CronetUrlRequest(this, url, priority, callback, executor,
requestAnnotations, | 177 return new CronetUrlRequest(this, url, priority, callback, executor,
requestAnnotations, |
| 178 metricsCollectionEnabled, disableCache, disableConnectionMig
ration); | 178 metricsCollectionEnabled, disableCache, disableConnectionMig
ration); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 @Override | 182 @Override |
| 183 public BidirectionalStream createBidirectionalStream(String url, | 183 public BidirectionalStream createBidirectionalStream(String url, |
| 184 BidirectionalStream.Callback callback, Executor executor, String htt
pMethod, | 184 BidirectionalStream.Callback callback, Executor executor, String htt
pMethod, |
| 185 List<Map.Entry<String, String>> requestHeaders, | 185 List<Map.Entry<String, String>> requestHeaders, |
| 186 @BidirectionalStream.Builder.StreamPriority int priority, boolean di
sableAutoFlush, | 186 @BidirectionalStream.Builder.StreamPriority int priority, |
| 187 boolean delayRequestHeadersUntilFirstFlush) { | 187 boolean delayRequestHeadersUntilFirstFlush) { |
| 188 synchronized (mLock) { | 188 synchronized (mLock) { |
| 189 checkHaveAdapter(); | 189 checkHaveAdapter(); |
| 190 return new CronetBidirectionalStream(this, url, priority, callback,
executor, | 190 return new CronetBidirectionalStream(this, url, priority, callback,
executor, |
| 191 httpMethod, requestHeaders, disableAutoFlush, | 191 httpMethod, requestHeaders, delayRequestHeadersUntilFirstFlu
sh); |
| 192 delayRequestHeadersUntilFirstFlush); | |
| 193 } | 192 } |
| 194 } | 193 } |
| 195 | 194 |
| 196 @Override | 195 @Override |
| 197 public boolean isEnabled() { | 196 public boolean isEnabled() { |
| 198 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH; | 197 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH; |
| 199 } | 198 } |
| 200 | 199 |
| 201 @Override | 200 @Override |
| 202 public String getVersionString() { | 201 public String getVersionString() { |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 570 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 572 private native void nativeConfigureNetworkQualityEstimatorForTesting( | 571 private native void nativeConfigureNetworkQualityEstimatorForTesting( |
| 573 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp
onses); | 572 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp
onses); |
| 574 | 573 |
| 575 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 574 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 576 private native void nativeProvideRTTObservations(long nativePtr, boolean sho
uld); | 575 private native void nativeProvideRTTObservations(long nativePtr, boolean sho
uld); |
| 577 | 576 |
| 578 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 577 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 579 private native void nativeProvideThroughputObservations(long nativePtr, bool
ean should); | 578 private native void nativeProvideThroughputObservations(long nativePtr, bool
ean should); |
| 580 } | 579 } |
| OLD | NEW |