| 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_ADAPTER_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ |
| 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ | 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Gets http status text from the response headers. | 97 // Gets http status text from the response headers. |
| 98 base::android::ScopedJavaLocalRef<jstring> GetHttpStatusText( | 98 base::android::ScopedJavaLocalRef<jstring> GetHttpStatusText( |
| 99 JNIEnv* env, | 99 JNIEnv* env, |
| 100 jobject jcaller) const; | 100 jobject jcaller) const; |
| 101 | 101 |
| 102 // Gets NPN or ALPN Negotiated Protocol (if any) from HttpResponseInfo. | 102 // Gets NPN or ALPN Negotiated Protocol (if any) from HttpResponseInfo. |
| 103 base::android::ScopedJavaLocalRef<jstring> GetNegotiatedProtocol( | 103 base::android::ScopedJavaLocalRef<jstring> GetNegotiatedProtocol( |
| 104 JNIEnv* env, | 104 JNIEnv* env, |
| 105 jobject jcaller) const; | 105 jobject jcaller) const; |
| 106 | 106 |
| 107 // Returns the host and port of the proxy server, if one was used. |
| 108 base::android::ScopedJavaLocalRef<jstring> GetProxyServer( |
| 109 JNIEnv* env, |
| 110 jobject jcaller) const; |
| 111 |
| 107 // Returns true if response is coming from the cache. | 112 // Returns true if response is coming from the cache. |
| 108 jboolean GetWasCached(JNIEnv* env, jobject jcaller) const; | 113 jboolean GetWasCached(JNIEnv* env, jobject jcaller) const; |
| 109 | 114 |
| 110 // Gets the total amount of body data received from network after | 115 // Gets the total amount of body data received from network after |
| 111 // SSL/SPDY/QUIC decoding and proxy handling. Basically the size of the body | 116 // SSL/SPDY/QUIC decoding and proxy handling. Basically the size of the body |
| 112 // prior to decompression. | 117 // prior to decompression. |
| 113 int64 GetTotalReceivedBytes(JNIEnv* env, jobject jcaller) const; | 118 int64 GetTotalReceivedBytes(JNIEnv* env, jobject jcaller) const; |
| 114 | 119 |
| 115 // net::URLRequest::Delegate implementations: | 120 // net::URLRequest::Delegate implementations: |
| 116 | 121 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 153 |
| 149 scoped_refptr<IOBufferWithByteBuffer> read_buffer_; | 154 scoped_refptr<IOBufferWithByteBuffer> read_buffer_; |
| 150 scoped_ptr<net::URLRequest> url_request_; | 155 scoped_ptr<net::URLRequest> url_request_; |
| 151 | 156 |
| 152 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); | 157 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); |
| 153 }; | 158 }; |
| 154 | 159 |
| 155 } // namespace cronet | 160 } // namespace cronet |
| 156 | 161 |
| 157 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ | 162 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ |
| OLD | NEW |