| 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_SPDY_SPDY_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_STREAM_H_ |
| 6 #define NET_SPDY_SPDY_STREAM_H_ | 6 #define NET_SPDY_SPDY_STREAM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 STATE_CLOSED, | 389 STATE_CLOSED, |
| 390 }; | 390 }; |
| 391 | 391 |
| 392 // Per RFC 7540 Section 8.1, an HTTP response consists of: | 392 // Per RFC 7540 Section 8.1, an HTTP response consists of: |
| 393 // * zero or more header blocks with informational (1xx) HTTP status, | 393 // * zero or more header blocks with informational (1xx) HTTP status, |
| 394 // * one header block, | 394 // * one header block, |
| 395 // * zero or more DATA frames, | 395 // * zero or more DATA frames, |
| 396 // * zero or one header block ("trailers"). | 396 // * zero or one header block ("trailers"). |
| 397 // Each header block must have a ":status" header field. SpdyStream enforces | 397 // Each header block must have a ":status" header field. SpdyStream enforces |
| 398 // these requirements, and resets the stream if they are not met. | 398 // these requirements, and resets the stream if they are not met. |
| 399 // TODO(bnc) https://crbug.com/662197 Add support for informational headers. | |
| 400 enum ResponseState { | 399 enum ResponseState { |
| 401 READY_FOR_HEADERS, | 400 READY_FOR_HEADERS, |
| 402 READY_FOR_DATA_OR_TRAILERS, | 401 READY_FOR_DATA_OR_TRAILERS, |
| 403 TRAILERS_RECEIVED | 402 TRAILERS_RECEIVED |
| 404 }; | 403 }; |
| 405 | 404 |
| 406 // Update the histograms. Can safely be called repeatedly, but should only | 405 // Update the histograms. Can safely be called repeatedly, but should only |
| 407 // be called after the stream has completed. | 406 // be called after the stream has completed. |
| 408 void UpdateHistograms(); | 407 void UpdateHistograms(); |
| 409 | 408 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 bool write_handler_guard_; | 517 bool write_handler_guard_; |
| 519 | 518 |
| 520 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; | 519 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; |
| 521 | 520 |
| 522 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 521 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
| 523 }; | 522 }; |
| 524 | 523 |
| 525 } // namespace net | 524 } // namespace net |
| 526 | 525 |
| 527 #endif // NET_SPDY_SPDY_STREAM_H_ | 526 #endif // NET_SPDY_SPDY_STREAM_H_ |
| OLD | NEW |