| 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; | 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 return new CronetUrlRequest(this, url, priority, callback, executor,
requestAnnotations, | 142 return new CronetUrlRequest(this, url, priority, callback, executor,
requestAnnotations, |
| 143 metricsCollectionEnabled); | 143 metricsCollectionEnabled); |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 @Override | 147 @Override |
| 148 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea
m.Callback callback, | 148 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea
m.Callback callback, |
| 149 Executor executor, String httpMethod, List<Map.Entry<String, String>
> requestHeaders, | 149 Executor executor, String httpMethod, List<Map.Entry<String, String>
> requestHeaders, |
| 150 @BidirectionalStream.Builder.StreamPriority int priority) { | 150 @BidirectionalStream.Builder.StreamPriority int priority, boolean di
sableAutoFlush) { |
| 151 synchronized (mLock) { | 151 synchronized (mLock) { |
| 152 checkHaveAdapter(); | 152 checkHaveAdapter(); |
| 153 return new CronetBidirectionalStream( | 153 return new CronetBidirectionalStream(this, url, priority, callback,
executor, |
| 154 this, url, priority, callback, executor, httpMethod, request
Headers); | 154 httpMethod, requestHeaders, disableAutoFlush); |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 | 157 |
| 158 @Override | 158 @Override |
| 159 public boolean isEnabled() { | 159 public boolean isEnabled() { |
| 160 return Build.VERSION.SDK_INT >= 14; | 160 return Build.VERSION.SDK_INT >= 14; |
| 161 } | 161 } |
| 162 | 162 |
| 163 @Override | 163 @Override |
| 164 public String getVersionString() { | 164 public String getVersionString() { |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 504 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 505 private native void nativeEnableNetworkQualityEstimator( | 505 private native void nativeEnableNetworkQualityEstimator( |
| 506 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp
onses); | 506 long nativePtr, boolean useLocalHostRequests, boolean useSmallerResp
onses); |
| 507 | 507 |
| 508 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 508 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 509 private native void nativeProvideRTTObservations(long nativePtr, boolean sho
uld); | 509 private native void nativeProvideRTTObservations(long nativePtr, boolean sho
uld); |
| 510 | 510 |
| 511 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 511 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
| 512 private native void nativeProvideThroughputObservations(long nativePtr, bool
ean should); | 512 private native void nativeProvideThroughputObservations(long nativePtr, bool
ean should); |
| 513 } | 513 } |
| OLD | NEW |