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 // net::URLRequest::Delegate implementations: | 115 // net::URLRequest::Delegate implementations: |
111 | 116 |
112 void OnReceivedRedirect(net::URLRequest* request, | 117 void OnReceivedRedirect(net::URLRequest* request, |
113 const net::RedirectInfo& redirect_info, | 118 const net::RedirectInfo& redirect_info, |
114 bool* defer_redirect) override; | 119 bool* defer_redirect) override; |
115 void OnResponseStarted(net::URLRequest* request) override; | 120 void OnResponseStarted(net::URLRequest* request) override; |
116 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; | 121 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; |
(...skipping 26 matching lines...) Expand all Loading... |
143 | 148 |
144 scoped_refptr<IOBufferWithByteBuffer> read_buffer_; | 149 scoped_refptr<IOBufferWithByteBuffer> read_buffer_; |
145 scoped_ptr<net::URLRequest> url_request_; | 150 scoped_ptr<net::URLRequest> url_request_; |
146 | 151 |
147 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); | 152 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); |
148 }; | 153 }; |
149 | 154 |
150 } // namespace cronet | 155 } // namespace cronet |
151 | 156 |
152 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ | 157 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ |
OLD | NEW |