| 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 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ |
| 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ | 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class TimeTicks; | 26 class TimeTicks; |
| 27 } // namespace base | 27 } // namespace base |
| 28 | 28 |
| 29 namespace net { | 29 namespace net { |
| 30 class HttpServerPropertiesManager; | 30 class HttpServerPropertiesManager; |
| 31 class NetLog; | 31 class NetLog; |
| 32 class ProxyConfigService; | 32 class ProxyConfigService; |
| 33 class SdchOwner; | 33 class SdchOwner; |
| 34 class URLRequestContext; | 34 class URLRequestContext; |
| 35 class WriteToFileNetLogObserver; | 35 class WriteToFileNetLogObserver; |
| 36 |
| 37 #if defined(CRONET_TEST) |
| 38 class MockCertVerifier; |
| 39 class URLRequestContextBuilder; |
| 40 #endif |
| 36 } // namespace net | 41 } // namespace net |
| 37 | 42 |
| 38 namespace cronet { | 43 namespace cronet { |
| 39 | 44 |
| 40 #if defined(DATA_REDUCTION_PROXY_SUPPORT) | 45 #if defined(DATA_REDUCTION_PROXY_SUPPORT) |
| 41 class CronetDataReductionProxy; | 46 class CronetDataReductionProxy; |
| 42 #endif | 47 #endif |
| 43 | 48 |
| 44 struct URLRequestContextConfig; | 49 struct URLRequestContextConfig; |
| 45 | 50 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 int32_t rtt_ms, | 137 int32_t rtt_ms, |
| 133 const base::TimeTicks& timestamp, | 138 const base::TimeTicks& timestamp, |
| 134 net::NetworkQualityEstimator::ObservationSource source) override; | 139 net::NetworkQualityEstimator::ObservationSource source) override; |
| 135 | 140 |
| 136 // net::NetworkQualityEstimator::ThroughputObserver implementation. | 141 // net::NetworkQualityEstimator::ThroughputObserver implementation. |
| 137 void OnThroughputObservation( | 142 void OnThroughputObservation( |
| 138 int32_t throughput_kbps, | 143 int32_t throughput_kbps, |
| 139 const base::TimeTicks& timestamp, | 144 const base::TimeTicks& timestamp, |
| 140 net::NetworkQualityEstimator::ObservationSource source) override; | 145 net::NetworkQualityEstimator::ObservationSource source) override; |
| 141 | 146 |
| 147 #if defined(CRONET_TEST) |
| 148 // Additionally configures |builder| for testing. |
| 149 void ConfigureURLRequestContextBuilderForTesting( |
| 150 URLRequestContextConfig* config, |
| 151 net::URLRequestContextBuilder* builder); |
| 152 #endif |
| 153 |
| 142 // Network thread is owned by |this|, but is destroyed from java thread. | 154 // Network thread is owned by |this|, but is destroyed from java thread. |
| 143 base::Thread* network_thread_; | 155 base::Thread* network_thread_; |
| 144 | 156 |
| 145 // File thread should be destroyed last. | 157 // File thread should be destroyed last. |
| 146 scoped_ptr<base::Thread> file_thread_; | 158 scoped_ptr<base::Thread> file_thread_; |
| 147 | 159 |
| 148 // |write_to_file_observer_| and |context_| should only be accessed on | 160 // |write_to_file_observer_| and |context_| should only be accessed on |
| 149 // network thread. | 161 // network thread. |
| 150 scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; | 162 scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; |
| 151 | 163 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 174 // A network quality estimator. | 186 // A network quality estimator. |
| 175 scoped_ptr<net::NetworkQualityEstimator> network_quality_estimator_; | 187 scoped_ptr<net::NetworkQualityEstimator> network_quality_estimator_; |
| 176 | 188 |
| 177 // Java object that owns this CronetURLRequestContextAdapter. | 189 // Java object that owns this CronetURLRequestContextAdapter. |
| 178 base::android::ScopedJavaGlobalRef<jobject> jcronet_url_request_context_; | 190 base::android::ScopedJavaGlobalRef<jobject> jcronet_url_request_context_; |
| 179 | 191 |
| 180 #if defined(DATA_REDUCTION_PROXY_SUPPORT) | 192 #if defined(DATA_REDUCTION_PROXY_SUPPORT) |
| 181 scoped_ptr<CronetDataReductionProxy> data_reduction_proxy_; | 193 scoped_ptr<CronetDataReductionProxy> data_reduction_proxy_; |
| 182 #endif | 194 #endif |
| 183 | 195 |
| 196 #if defined(CRONET_TEST) |
| 197 // Used in testing to trust certs. |
| 198 scoped_ptr<net::MockCertVerifier> mock_cert_verifier_; |
| 199 #endif |
| 200 |
| 184 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter); | 201 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter); |
| 185 }; | 202 }; |
| 186 | 203 |
| 187 } // namespace cronet | 204 } // namespace cronet |
| 188 | 205 |
| 189 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ | 206 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ |
| OLD | NEW |