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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 #include "net/base/bandwidth_metrics.h" | 17 #include "net/base/bandwidth_metrics.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/net_export.h" | 19 #include "net/base/net_export.h" |
20 #include "net/base/net_log.h" | 20 #include "net/base/net_log.h" |
| 21 #include "net/base/request_priority.h" |
21 #include "net/base/server_bound_cert_service.h" | 22 #include "net/base/server_bound_cert_service.h" |
22 #include "net/base/ssl_client_cert_type.h" | 23 #include "net/base/ssl_client_cert_type.h" |
23 #include "net/base/upload_data.h" | 24 #include "net/base/upload_data.h" |
24 #include "net/socket/ssl_client_socket.h" | 25 #include "net/socket/ssl_client_socket.h" |
25 #include "net/spdy/spdy_framer.h" | 26 #include "net/spdy/spdy_framer.h" |
26 #include "net/spdy/spdy_protocol.h" | 27 #include "net/spdy/spdy_protocol.h" |
27 | 28 |
28 namespace net { | 29 namespace net { |
29 | 30 |
30 class AddressList; | 31 class AddressList; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 SpdyStreamId stream_id() const { return stream_id_; } | 116 SpdyStreamId stream_id() const { return stream_id_; } |
116 void set_stream_id(SpdyStreamId stream_id) { stream_id_ = stream_id; } | 117 void set_stream_id(SpdyStreamId stream_id) { stream_id_ = stream_id; } |
117 | 118 |
118 bool response_received() const { return response_received_; } | 119 bool response_received() const { return response_received_; } |
119 void set_response_received() { response_received_ = true; } | 120 void set_response_received() { response_received_ = true; } |
120 | 121 |
121 // For pushed streams, we track a path to identify them. | 122 // For pushed streams, we track a path to identify them. |
122 const std::string& path() const { return path_; } | 123 const std::string& path() const { return path_; } |
123 void set_path(const std::string& path) { path_ = path; } | 124 void set_path(const std::string& path) { path_ = path; } |
124 | 125 |
125 int priority() const { return priority_; } | 126 RequestPriority priority() const { return priority_; } |
126 void set_priority(int priority) { priority_ = priority; } | 127 void set_priority(RequestPriority priority) { priority_ = priority; } |
127 | 128 |
128 int32 send_window_size() const { return send_window_size_; } | 129 int32 send_window_size() const { return send_window_size_; } |
129 void set_send_window_size(int32 window_size) { | 130 void set_send_window_size(int32 window_size) { |
130 send_window_size_ = window_size; | 131 send_window_size_ = window_size; |
131 } | 132 } |
132 | 133 |
133 int32 recv_window_size() const { return recv_window_size_; } | 134 int32 recv_window_size() const { return recv_window_size_; } |
134 void set_recv_window_size(int32 window_size) { | 135 void set_recv_window_size(int32 window_size) { |
135 recv_window_size_ = window_size; | 136 recv_window_size_ = window_size; |
136 } | 137 } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // the MessageLoop to replay all the data that the server has already sent. | 309 // the MessageLoop to replay all the data that the server has already sent. |
309 void PushedStreamReplayData(); | 310 void PushedStreamReplayData(); |
310 | 311 |
311 // There is a small period of time between when a server pushed stream is | 312 // There is a small period of time between when a server pushed stream is |
312 // first created, and the pushed data is replayed. Any data received during | 313 // first created, and the pushed data is replayed. Any data received during |
313 // this time should continue to be buffered. | 314 // this time should continue to be buffered. |
314 bool continue_buffering_data_; | 315 bool continue_buffering_data_; |
315 | 316 |
316 SpdyStreamId stream_id_; | 317 SpdyStreamId stream_id_; |
317 std::string path_; | 318 std::string path_; |
318 int priority_; | 319 RequestPriority priority_; |
319 size_t slot_; | 320 size_t slot_; |
320 | 321 |
321 // Flow control variables. | 322 // Flow control variables. |
322 bool stalled_by_flow_control_; | 323 bool stalled_by_flow_control_; |
323 int32 send_window_size_; | 324 int32 send_window_size_; |
324 int32 recv_window_size_; | 325 int32 recv_window_size_; |
325 int32 unacked_recv_window_bytes_; | 326 int32 unacked_recv_window_bytes_; |
326 | 327 |
327 const bool pushed_; | 328 const bool pushed_; |
328 ScopedBandwidthMetrics metrics_; | 329 ScopedBandwidthMetrics metrics_; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 const SpdyStreamId stream_id_; | 386 const SpdyStreamId stream_id_; |
386 const int status_; | 387 const int status_; |
387 const std::string description_; | 388 const std::string description_; |
388 | 389 |
389 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamErrorParameter); | 390 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamErrorParameter); |
390 }; | 391 }; |
391 | 392 |
392 } // namespace net | 393 } // namespace net |
393 | 394 |
394 #endif // NET_SPDY_SPDY_STREAM_H_ | 395 #endif // NET_SPDY_SPDY_STREAM_H_ |
OLD | NEW |