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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 // Saves the given headers into |response_headers_| and calls | 428 // Saves the given headers into |response_headers_| and calls |
428 // OnHeadersReceived() on the delegate if attached. | 429 // OnHeadersReceived() on the delegate if attached. |
429 void SaveResponseHeaders(const SpdyHeaderBlock& response_headers); | 430 void SaveResponseHeaders(const SpdyHeaderBlock& response_headers); |
430 | 431 |
431 static std::string DescribeState(State state); | 432 static std::string DescribeState(State state); |
432 | 433 |
433 const SpdyStreamType type_; | 434 const SpdyStreamType type_; |
434 | 435 |
435 SpdyStreamId stream_id_; | 436 SpdyStreamId stream_id_; |
436 const GURL url_; | 437 const GURL url_; |
437 const RequestPriority priority_; | 438 RequestPriority priority_; |
438 | 439 |
439 bool send_stalled_by_flow_control_; | 440 bool send_stalled_by_flow_control_; |
440 | 441 |
441 // Current send window size. | 442 // Current send window size. |
442 int32_t send_window_size_; | 443 int32_t send_window_size_; |
443 | 444 |
444 // Maximum receive window size. Each time a WINDOW_UPDATE is sent, it | 445 // Maximum receive window size. Each time a WINDOW_UPDATE is sent, it |
445 // restores the receive window size to this value. | 446 // restores the receive window size to this value. |
446 int32_t max_recv_window_size_; | 447 int32_t max_recv_window_size_; |
447 | 448 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 bool write_handler_guard_; | 518 bool write_handler_guard_; |
518 | 519 |
519 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; | 520 base::WeakPtrFactory<SpdyStream> weak_ptr_factory_; |
520 | 521 |
521 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 522 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
522 }; | 523 }; |
523 | 524 |
524 } // namespace net | 525 } // namespace net |
525 | 526 |
526 #endif // NET_SPDY_SPDY_STREAM_H_ | 527 #endif // NET_SPDY_SPDY_STREAM_H_ |
OLD | NEW |