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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 base::Time response_time() const { return response_time_; } | 135 base::Time response_time() const { return response_time_; } |
136 | 136 |
137 SpdyStreamType type() const { return type_; } | 137 SpdyStreamType type() const { return type_; } |
138 | 138 |
139 SpdyStreamId stream_id() const { return stream_id_; } | 139 SpdyStreamId stream_id() const { return stream_id_; } |
140 void set_stream_id(SpdyStreamId stream_id) { stream_id_ = stream_id; } | 140 void set_stream_id(SpdyStreamId stream_id) { stream_id_ = stream_id; } |
141 | 141 |
142 const GURL& url() const { return url_; } | 142 const GURL& url() const { return url_; } |
143 | 143 |
144 RequestPriority priority() const { return priority_; } | 144 RequestPriority priority() const { return priority_; } |
| 145 void set_priority(RequestPriority p) { priority_ = p; } |
145 | 146 |
146 int32_t send_window_size() const { return send_window_size_; } | 147 int32_t send_window_size() const { return send_window_size_; } |
147 | 148 |
148 int32_t recv_window_size() const { return recv_window_size_; } | 149 int32_t recv_window_size() const { return recv_window_size_; } |
149 | 150 |
150 bool send_stalled_by_flow_control() const { | 151 bool send_stalled_by_flow_control() const { |
151 return send_stalled_by_flow_control_; | 152 return send_stalled_by_flow_control_; |
152 } | 153 } |
153 | 154 |
154 void set_send_stalled_by_flow_control(bool stalled) { | 155 void set_send_stalled_by_flow_control(bool stalled) { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 // Saves the given headers into |response_headers_| and calls | 427 // Saves the given headers into |response_headers_| and calls |
427 // OnHeadersReceived() on the delegate if attached. | 428 // OnHeadersReceived() on the delegate if attached. |
428 void SaveResponseHeaders(const SpdyHeaderBlock& response_headers); | 429 void SaveResponseHeaders(const SpdyHeaderBlock& response_headers); |
429 | 430 |
430 static std::string DescribeState(State state); | 431 static std::string DescribeState(State state); |
431 | 432 |
432 const SpdyStreamType type_; | 433 const SpdyStreamType type_; |
433 | 434 |
434 SpdyStreamId stream_id_; | 435 SpdyStreamId stream_id_; |
435 const GURL url_; | 436 const GURL url_; |
436 const RequestPriority priority_; | 437 RequestPriority priority_; |
437 | 438 |
438 bool send_stalled_by_flow_control_; | 439 bool send_stalled_by_flow_control_; |
439 | 440 |
440 // Current send window size. | 441 // Current send window size. |
441 int32_t send_window_size_; | 442 int32_t send_window_size_; |
442 | 443 |
443 // Maximum receive window size. Each time a WINDOW_UPDATE is sent, it | 444 // Maximum receive window size. Each time a WINDOW_UPDATE is sent, it |
444 // restores the receive window size to this value. | 445 // restores the receive window size to this value. |
445 int32_t max_recv_window_size_; | 446 int32_t max_recv_window_size_; |
446 | 447 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 bool write_handler_guard_; | 517 bool write_handler_guard_; |
517 | 518 |
518 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; | 519 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; |
519 | 520 |
520 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 521 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
521 }; | 522 }; |
522 | 523 |
523 } // namespace net | 524 } // namespace net |
524 | 525 |
525 #endif // NET_SPDY_SPDY_STREAM_H_ | 526 #endif // NET_SPDY_SPDY_STREAM_H_ |
OLD | NEW |