| 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 #ifndef NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ |    5 #ifndef NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ | 
|    6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ |    6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ | 
|    7  |    7  | 
|    8 #include <stddef.h> |    8 #include <stddef.h> | 
|    9 #include <stdint.h> |    9 #include <stdint.h> | 
|   10  |   10  | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   62   bool IsConnectionReused() const override; |   62   bool IsConnectionReused() const override; | 
|   63   int64_t GetTotalReceivedBytes() const override; |   63   int64_t GetTotalReceivedBytes() const override; | 
|   64   int64_t GetTotalSentBytes() const override; |   64   int64_t GetTotalSentBytes() const override; | 
|   65   bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |   65   bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 
|   66   bool GetAlternativeService( |   66   bool GetAlternativeService( | 
|   67       AlternativeService* alternative_service) const override; |   67       AlternativeService* alternative_service) const override; | 
|   68   void PopulateNetErrorDetails(NetErrorDetails* details) override; |   68   void PopulateNetErrorDetails(NetErrorDetails* details) override; | 
|   69   void SetPriority(RequestPriority priority) override; |   69   void SetPriority(RequestPriority priority) override; | 
|   70  |   70  | 
|   71   // QuicChromiumClientStream::Delegate implementation |   71   // QuicChromiumClientStream::Delegate implementation | 
|   72   void OnInitialHeadersAvailable(const SpdyHeaderBlock& headers, |  | 
|   73                                  size_t frame_len) override; |  | 
|   74   void OnDataAvailable() override; |   72   void OnDataAvailable() override; | 
|   75   void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers, |   73   void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers, | 
|   76                                   size_t frame_len) override; |   74                                   size_t frame_len) override; | 
|   77   void OnClose() override; |   75   void OnClose() override; | 
|   78   void OnError(int error) override; |   76   void OnError(int error) override; | 
|   79  |   77  | 
|   80   // QuicClientPushPromiseIndex::Delegate implementation |   78   // QuicClientPushPromiseIndex::Delegate implementation | 
|   81   bool CheckVary(const SpdyHeaderBlock& client_request, |   79   bool CheckVary(const SpdyHeaderBlock& client_request, | 
|   82                  const SpdyHeaderBlock& promise_request, |   80                  const SpdyHeaderBlock& promise_request, | 
|   83                  const SpdyHeaderBlock& promise_response) override; |   81                  const SpdyHeaderBlock& promise_response) override; | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  117   int DoRequestStream(); |  115   int DoRequestStream(); | 
|  118   int DoRequestStreamComplete(int rv); |  116   int DoRequestStreamComplete(int rv); | 
|  119   int DoSetRequestPriority(); |  117   int DoSetRequestPriority(); | 
|  120   int DoSendHeaders(); |  118   int DoSendHeaders(); | 
|  121   int DoSendHeadersComplete(int rv); |  119   int DoSendHeadersComplete(int rv); | 
|  122   int DoReadRequestBody(); |  120   int DoReadRequestBody(); | 
|  123   int DoReadRequestBodyComplete(int rv); |  121   int DoReadRequestBodyComplete(int rv); | 
|  124   int DoSendBody(); |  122   int DoSendBody(); | 
|  125   int DoSendBodyComplete(int rv); |  123   int DoSendBodyComplete(int rv); | 
|  126  |  124  | 
 |  125   void OnReadResponseHeadersComplete(int rv); | 
|  127   int ProcessResponseHeaders(const SpdyHeaderBlock& headers); |  126   int ProcessResponseHeaders(const SpdyHeaderBlock& headers); | 
|  128  |  127  | 
|  129   int ReadAvailableData(IOBuffer* buf, int buf_len); |  128   int ReadAvailableData(IOBuffer* buf, int buf_len); | 
|  130   void EnterStateSendHeaders(); |  129   void EnterStateSendHeaders(); | 
|  131  |  130  | 
|  132   void ResetStream(); |  131   void ResetStream(); | 
|  133  |  132  | 
|  134   // If |has_response_status_| is false, sets |response_status| to the result |  133   // If |has_response_status_| is false, sets |response_status| to the result | 
|  135   // of ComputeResponseStatus(). Returns |response_status_|. |  134   // of ComputeResponseStatus(). Returns |response_status_|. | 
|  136   int GetResponseStatus(); |  135   int GetResponseStatus(); | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  176   bool has_response_status_;  // true if response_status_ as been set. |  175   bool has_response_status_;  // true if response_status_ as been set. | 
|  177   // Because response data is buffered, also buffer the response status if the |  176   // Because response data is buffered, also buffer the response status if the | 
|  178   // stream is explicitly closed via OnError or OnClose with an error. |  177   // stream is explicitly closed via OnError or OnClose with an error. | 
|  179   // Once all buffered data has been returned, this will be used as the final |  178   // Once all buffered data has been returned, this will be used as the final | 
|  180   // response. |  179   // response. | 
|  181   int response_status_; |  180   int response_status_; | 
|  182  |  181  | 
|  183   // Serialized request headers. |  182   // Serialized request headers. | 
|  184   SpdyHeaderBlock request_headers_; |  183   SpdyHeaderBlock request_headers_; | 
|  185  |  184  | 
 |  185   SpdyHeaderBlock response_header_block_; | 
|  186   bool response_headers_received_; |  186   bool response_headers_received_; | 
|  187  |  187  | 
|  188   // Number of bytes received by the headers stream on behalf of this stream. |  188   // Number of bytes received by the headers stream on behalf of this stream. | 
|  189   int64_t headers_bytes_received_; |  189   int64_t headers_bytes_received_; | 
|  190   // Number of bytes sent by the headers stream on behalf of this stream. |  190   // Number of bytes sent by the headers stream on behalf of this stream. | 
|  191   int64_t headers_bytes_sent_; |  191   int64_t headers_bytes_sent_; | 
|  192  |  192  | 
|  193   // Number of bytes received when the stream was closed. |  193   // Number of bytes received when the stream was closed. | 
|  194   int64_t closed_stream_received_bytes_; |  194   int64_t closed_stream_received_bytes_; | 
|  195   // Number of bytes sent when the stream was closed. |  195   // Number of bytes sent when the stream was closed. | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  231   LoadTimingInfo::ConnectTiming connect_timing_; |  231   LoadTimingInfo::ConnectTiming connect_timing_; | 
|  232  |  232  | 
|  233   base::WeakPtrFactory<QuicHttpStream> weak_factory_; |  233   base::WeakPtrFactory<QuicHttpStream> weak_factory_; | 
|  234  |  234  | 
|  235   DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); |  235   DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); | 
|  236 }; |  236 }; | 
|  237  |  237  | 
|  238 }  // namespace net |  238 }  // namespace net | 
|  239  |  239  | 
|  240 #endif  // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ |  240 #endif  // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ | 
| OLD | NEW |