OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 provides an abstraction for a basic http streams, http pipelining | 5 // HttpStream provides an abstraction for a basic http streams, http pipelining |
6 // implementations, and SPDY. The HttpStream subtype is expected to manage the | 6 // implementations, and SPDY. The HttpStream subtype is expected to manage the |
7 // underlying transport appropriately. For example, a non-pipelined HttpStream | 7 // underlying transport appropriately. For example, a non-pipelined HttpStream |
8 // would return the transport socket to the pool for reuse. SPDY streams on the | 8 // would return the transport socket to the pool for reuse. SPDY streams on the |
9 // other hand leave the transport socket management to the SpdySession. | 9 // other hand leave the transport socket management to the SpdySession. |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Queries the UploadDataStream for its progress (bytes sent). | 29 // Queries the UploadDataStream for its progress (bytes sent). |
30 virtual UploadProgress GetUploadProgress() const = 0; | 30 virtual UploadProgress GetUploadProgress() const = 0; |
31 | 31 |
32 // Returns a new (not initialized) stream using the same underlying | 32 // Returns a new (not initialized) stream using the same underlying |
33 // connection and invalidates the old stream - no further methods should be | 33 // connection and invalidates the old stream - no further methods should be |
34 // called on the old stream. The caller should ensure that the response body | 34 // called on the old stream. The caller should ensure that the response body |
35 // from the previous request is drained before calling this method. If the | 35 // from the previous request is drained before calling this method. If the |
36 // subclass does not support renewing the stream, NULL is returned. | 36 // subclass does not support renewing the stream, NULL is returned. |
37 virtual HttpStream* RenewStreamForAuth() = 0; | 37 virtual HttpStream* RenewStreamForAuth() = 0; |
38 | 38 |
39 // Record histogram of number of round trips taken to download the full | |
40 // response body vs bytes transferred. | |
41 virtual void LogNumRttVsBytesMetrics() const = 0; | |
42 | |
43 private: | 39 private: |
44 DISALLOW_COPY_AND_ASSIGN(HttpStream); | 40 DISALLOW_COPY_AND_ASSIGN(HttpStream); |
45 }; | 41 }; |
46 | 42 |
47 } // namespace net | 43 } // namespace net |
48 | 44 |
49 #endif // NET_HTTP_HTTP_STREAM_H_ | 45 #endif // NET_HTTP_HTTP_STREAM_H_ |
OLD | NEW |