| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 int64_t raw_received_bytes() const { return raw_received_bytes_; } | 365 int64_t raw_received_bytes() const { return raw_received_bytes_; } |
| 366 int64_t raw_sent_bytes() const { return raw_sent_bytes_; } | 366 int64_t raw_sent_bytes() const { return raw_sent_bytes_; } |
| 367 int recv_bytes() const { return recv_bytes_; } | 367 int recv_bytes() const { return recv_bytes_; } |
| 368 | 368 |
| 369 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const; | 369 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const; |
| 370 | 370 |
| 371 // Get the URL from the appropriate stream headers, or the empty | 371 // Get the URL from the appropriate stream headers, or the empty |
| 372 // GURL() if it is unknown. | 372 // GURL() if it is unknown. |
| 373 const GURL& GetUrlFromHeaders() const { return url_from_header_block_; } | 373 const GURL& GetUrlFromHeaders() const { return url_from_header_block_; } |
| 374 | 374 |
| 375 // Returns the estimate of dynamically allocated memory in bytes. |
| 376 size_t EstimateMemoryUsage() const; |
| 377 |
| 375 private: | 378 private: |
| 376 class HeadersBufferProducer; | 379 class HeadersBufferProducer; |
| 377 | 380 |
| 378 // SpdyStream states and transitions are modeled | 381 // SpdyStream states and transitions are modeled |
| 379 // on the HTTP/2 stream state machine. All states and transitions | 382 // on the HTTP/2 stream state machine. All states and transitions |
| 380 // are modeled, with the exceptions of RESERVED_LOCAL (the client | 383 // are modeled, with the exceptions of RESERVED_LOCAL (the client |
| 381 // cannot initate push streams), and the transition to OPEN due to | 384 // cannot initate push streams), and the transition to OPEN due to |
| 382 // a remote HEADERS (the client can only initate streams). | 385 // a remote HEADERS (the client can only initate streams). |
| 383 enum State { | 386 enum State { |
| 384 STATE_IDLE, | 387 STATE_IDLE, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 bool write_handler_guard_; | 521 bool write_handler_guard_; |
| 519 | 522 |
| 520 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; | 523 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; |
| 521 | 524 |
| 522 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 525 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
| 523 }; | 526 }; |
| 524 | 527 |
| 525 } // namespace net | 528 } // namespace net |
| 526 | 529 |
| 527 #endif // NET_SPDY_SPDY_STREAM_H_ | 530 #endif // NET_SPDY_SPDY_STREAM_H_ |
| OLD | NEW |