OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // HttpStream is an interface for reading and writing data to an HttpStream that | 5 // HttpStream is an interface for reading and writing data to an HttpStream that |
6 // keeps the client agnostic of the actual underlying transport layer. This | 6 // keeps the client agnostic of the actual underlying transport layer. This |
7 // provides an abstraction for both a basic http stream as well as http | 7 // provides an abstraction for both a basic http stream as well as http |
8 // pipelining implementations. The HttpStream subtype is expected to manage the | 8 // pipelining implementations. The HttpStream subtype is expected to manage the |
9 // underlying transport appropriately. For example, a non-pipelined HttpStream | 9 // underlying transport appropriately. For example, a non-pipelined HttpStream |
10 // would return the transport socket to the pool for reuse. SPDY streams on the | 10 // would return the transport socket to the pool for reuse. SPDY streams on the |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 // Get the SSLCertRequestInfo associated with this stream's connection. | 129 // Get the SSLCertRequestInfo associated with this stream's connection. |
130 // This should only be called for streams over SSL sockets, otherwise the | 130 // This should only be called for streams over SSL sockets, otherwise the |
131 // behavior is undefined. | 131 // behavior is undefined. |
132 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) = 0; | 132 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) = 0; |
133 | 133 |
134 // HACK(willchan): Really, we should move the HttpResponseDrainer logic into | 134 // HACK(willchan): Really, we should move the HttpResponseDrainer logic into |
135 // the HttpStream implementation. This is just a quick hack. | 135 // the HttpStream implementation. This is just a quick hack. |
136 virtual bool IsSpdyHttpStream() const = 0; | 136 virtual bool IsSpdyHttpStream() const = 0; |
137 | 137 |
| 138 // Record histogram of number of round trips taken to download the full |
| 139 // response body vs bytes transferred. |
| 140 virtual void LogNumRttVsBytesMetrics() const = 0; |
| 141 |
138 private: | 142 private: |
139 DISALLOW_COPY_AND_ASSIGN(HttpStream); | 143 DISALLOW_COPY_AND_ASSIGN(HttpStream); |
140 }; | 144 }; |
141 | 145 |
142 } // namespace net | 146 } // namespace net |
143 | 147 |
144 #endif // NET_HTTP_HTTP_STREAM_H_ | 148 #endif // NET_HTTP_HTTP_STREAM_H_ |
OLD | NEW |