Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: components/cronet/android/url_request_adapter.h

Issue 544223003: Add SetSupportsQuic method to explicitly specify server that supports QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_URL_REQUEST_ADAPTER_H_ 5 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_
6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // Get all response headers, as a HttpResponseHeaders object. 103 // Get all response headers, as a HttpResponseHeaders object.
104 net::HttpResponseHeaders* GetResponseHeaders() const; 104 net::HttpResponseHeaders* GetResponseHeaders() const;
105 105
106 // Returns the overall number of bytes read. 106 // Returns the overall number of bytes read.
107 size_t bytes_read() const { return bytes_read_; } 107 size_t bytes_read() const { return bytes_read_; }
108 108
109 // Returns a pointer to the downloaded data. 109 // Returns a pointer to the downloaded data.
110 unsigned char* Data() const; 110 unsigned char* Data() const;
111 111
112 // Get NPN or ALPN Negotiated Protocol (if any) from HttpResponseInfo.
113 std::string GetNegotiatedProtocol() const;
114
112 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; 115 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
113 116
114 virtual void OnReadCompleted(net::URLRequest* request, 117 virtual void OnReadCompleted(net::URLRequest* request,
115 int bytes_read) OVERRIDE; 118 int bytes_read) OVERRIDE;
116 119
117 private: 120 private:
118 static void OnDestroyRequest(URLRequestAdapter* self); 121 static void OnDestroyRequest(URLRequestAdapter* self);
119 122
120 void OnInitiateConnection(); 123 void OnInitiateConnection();
121 void OnCancelRequest(); 124 void OnCancelRequest();
(...skipping 24 matching lines...) Expand all
146 bool canceled_; 149 bool canceled_;
147 int64 expected_size_; 150 int64 expected_size_;
148 bool chunked_upload_; 151 bool chunked_upload_;
149 152
150 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter); 153 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter);
151 }; 154 };
152 155
153 } // namespace cronet 156 } // namespace cronet
154 157
155 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ 158 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698