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 <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 protocol_(default_protocol), | 743 protocol_(default_protocol), |
744 connection_at_risk_of_loss_time_( | 744 connection_at_risk_of_loss_time_( |
745 base::TimeDelta::FromSeconds(kDefaultConnectionAtRiskOfLossSeconds)), | 745 base::TimeDelta::FromSeconds(kDefaultConnectionAtRiskOfLossSeconds)), |
746 hung_interval_(base::TimeDelta::FromSeconds(kHungIntervalSeconds)), | 746 hung_interval_(base::TimeDelta::FromSeconds(kHungIntervalSeconds)), |
747 proxy_delegate_(proxy_delegate), | 747 proxy_delegate_(proxy_delegate), |
748 time_func_(time_func), | 748 time_func_(time_func), |
749 priority_dependencies_enabled_(enable_priority_dependencies), | 749 priority_dependencies_enabled_(enable_priority_dependencies), |
750 weak_factory_(this) { | 750 weak_factory_(this) { |
751 DCHECK_GE(protocol_, kProtoSPDYMinimumVersion); | 751 DCHECK_GE(protocol_, kProtoSPDYMinimumVersion); |
752 DCHECK_LE(protocol_, kProtoSPDYMaximumVersion); | 752 DCHECK_LE(protocol_, kProtoSPDYMaximumVersion); |
753 DCHECK(HttpStreamFactory::spdy_enabled()); | |
754 net_log_.BeginEvent( | 753 net_log_.BeginEvent( |
755 NetLog::TYPE_HTTP2_SESSION, | 754 NetLog::TYPE_HTTP2_SESSION, |
756 base::Bind(&NetLogSpdySessionCallback, &host_port_proxy_pair())); | 755 base::Bind(&NetLogSpdySessionCallback, &host_port_proxy_pair())); |
757 next_unclaimed_push_stream_sweep_time_ = time_func_() + | 756 next_unclaimed_push_stream_sweep_time_ = time_func_() + |
758 base::TimeDelta::FromSeconds(kMinPushedStreamLifetimeSeconds); | 757 base::TimeDelta::FromSeconds(kMinPushedStreamLifetimeSeconds); |
759 // TODO(mbelshe): consider randomization of the stream_hi_water_mark. | 758 // TODO(mbelshe): consider randomization of the stream_hi_water_mark. |
760 } | 759 } |
761 | 760 |
762 SpdySession::~SpdySession() { | 761 SpdySession::~SpdySession() { |
763 CHECK(!in_io_loop_); | 762 CHECK(!in_io_loop_); |
(...skipping 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3398 if (!queue->empty()) { | 3397 if (!queue->empty()) { |
3399 SpdyStreamId stream_id = queue->front(); | 3398 SpdyStreamId stream_id = queue->front(); |
3400 queue->pop_front(); | 3399 queue->pop_front(); |
3401 return stream_id; | 3400 return stream_id; |
3402 } | 3401 } |
3403 } | 3402 } |
3404 return 0; | 3403 return 0; |
3405 } | 3404 } |
3406 | 3405 |
3407 } // namespace net | 3406 } // namespace net |
OLD | NEW |