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 #include "net/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 const base::WeakPtr<HttpServerProperties>& http_server_properties, | 608 const base::WeakPtr<HttpServerProperties>& http_server_properties, |
609 TransportSecurityState* transport_security_state, | 609 TransportSecurityState* transport_security_state, |
610 bool verify_domain_authentication, | 610 bool verify_domain_authentication, |
611 bool enable_sending_initial_data, | 611 bool enable_sending_initial_data, |
612 bool enable_compression, | 612 bool enable_compression, |
613 bool enable_ping_based_connection_checking, | 613 bool enable_ping_based_connection_checking, |
614 NextProto default_protocol, | 614 NextProto default_protocol, |
615 size_t session_max_recv_window_size, | 615 size_t session_max_recv_window_size, |
616 size_t stream_max_recv_window_size, | 616 size_t stream_max_recv_window_size, |
617 size_t initial_max_concurrent_streams, | 617 size_t initial_max_concurrent_streams, |
618 size_t max_concurrent_streams_limit, | |
619 TimeFunc time_func, | 618 TimeFunc time_func, |
620 const HostPortPair& trusted_spdy_proxy, | 619 const HostPortPair& trusted_spdy_proxy, |
621 NetLog* net_log) | 620 NetLog* net_log) |
622 : in_io_loop_(false), | 621 : in_io_loop_(false), |
623 spdy_session_key_(spdy_session_key), | 622 spdy_session_key_(spdy_session_key), |
624 pool_(NULL), | 623 pool_(NULL), |
625 http_server_properties_(http_server_properties), | 624 http_server_properties_(http_server_properties), |
626 transport_security_state_(transport_security_state), | 625 transport_security_state_(transport_security_state), |
627 read_buffer_(new IOBuffer(kReadBufferSize)), | 626 read_buffer_(new IOBuffer(kReadBufferSize)), |
628 stream_hi_water_mark_(kFirstStreamId), | 627 stream_hi_water_mark_(kFirstStreamId), |
629 last_accepted_push_stream_id_(0), | 628 last_accepted_push_stream_id_(0), |
630 num_pushed_streams_(0u), | 629 num_pushed_streams_(0u), |
631 num_active_pushed_streams_(0u), | 630 num_active_pushed_streams_(0u), |
632 in_flight_write_frame_type_(DATA), | 631 in_flight_write_frame_type_(DATA), |
633 in_flight_write_frame_size_(0), | 632 in_flight_write_frame_size_(0), |
634 is_secure_(false), | 633 is_secure_(false), |
635 certificate_error_code_(OK), | 634 certificate_error_code_(OK), |
636 availability_state_(STATE_AVAILABLE), | 635 availability_state_(STATE_AVAILABLE), |
637 read_state_(READ_STATE_DO_READ), | 636 read_state_(READ_STATE_DO_READ), |
638 write_state_(WRITE_STATE_IDLE), | 637 write_state_(WRITE_STATE_IDLE), |
639 error_on_close_(OK), | 638 error_on_close_(OK), |
640 max_concurrent_streams_(initial_max_concurrent_streams == 0 | 639 max_concurrent_streams_(initial_max_concurrent_streams == 0 |
641 ? kInitialMaxConcurrentStreams | 640 ? kInitialMaxConcurrentStreams |
642 : initial_max_concurrent_streams), | 641 : initial_max_concurrent_streams), |
643 max_concurrent_streams_limit_(max_concurrent_streams_limit == 0 | |
644 ? kMaxConcurrentStreamLimit | |
645 : max_concurrent_streams_limit), | |
646 max_concurrent_pushed_streams_(kMaxConcurrentPushedStreams), | 642 max_concurrent_pushed_streams_(kMaxConcurrentPushedStreams), |
647 streams_initiated_count_(0), | 643 streams_initiated_count_(0), |
648 streams_pushed_count_(0), | 644 streams_pushed_count_(0), |
649 streams_pushed_and_claimed_count_(0), | 645 streams_pushed_and_claimed_count_(0), |
650 streams_abandoned_count_(0), | 646 streams_abandoned_count_(0), |
651 total_bytes_received_(0), | 647 total_bytes_received_(0), |
652 sent_settings_(false), | 648 sent_settings_(false), |
653 received_settings_(false), | 649 received_settings_(false), |
654 stalled_streams_(0), | 650 stalled_streams_(0), |
655 pings_in_flight_(0), | 651 pings_in_flight_(0), |
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3269 if (!queue->empty()) { | 3265 if (!queue->empty()) { |
3270 SpdyStreamId stream_id = queue->front(); | 3266 SpdyStreamId stream_id = queue->front(); |
3271 queue->pop_front(); | 3267 queue->pop_front(); |
3272 return stream_id; | 3268 return stream_id; |
3273 } | 3269 } |
3274 } | 3270 } |
3275 return 0; | 3271 return 0; |
3276 } | 3272 } |
3277 | 3273 |
3278 } // namespace net | 3274 } // namespace net |
OLD | NEW |