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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 flow_control_state_ = FLOW_CONTROL_STREAM; | 712 flow_control_state_ = FLOW_CONTROL_STREAM; |
713 } else { | 713 } else { |
714 flow_control_state_ = FLOW_CONTROL_NONE; | 714 flow_control_state_ = FLOW_CONTROL_NONE; |
715 } | 715 } |
716 | 716 |
717 buffered_spdy_framer_.reset( | 717 buffered_spdy_framer_.reset( |
718 new BufferedSpdyFramer(NextProtoToSpdyMajorVersion(protocol_), | 718 new BufferedSpdyFramer(NextProtoToSpdyMajorVersion(protocol_), |
719 enable_compression_)); | 719 enable_compression_)); |
720 buffered_spdy_framer_->set_visitor(this); | 720 buffered_spdy_framer_->set_visitor(this); |
721 buffered_spdy_framer_->set_debug_visitor(this); | 721 buffered_spdy_framer_->set_debug_visitor(this); |
722 UMA_HISTOGRAM_ENUMERATION("Net.SpdyVersion", protocol_, kProtoMaximumVersion); | 722 UMA_HISTOGRAM_ENUMERATION( |
| 723 "Net.SpdyVersion2", |
| 724 protocol_ - kProtoSPDYMinimumVersion, |
| 725 kProtoSPDYMaximumVersion - kProtoSPDYMinimumVersion + 1); |
723 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 726 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
724 UMA_HISTOGRAM_BOOLEAN("Net.SpdySessions_DataReductionProxy", | 727 UMA_HISTOGRAM_BOOLEAN("Net.SpdySessions_DataReductionProxy", |
725 host_port_pair().Equals(HostPortPair::FromURL( | 728 host_port_pair().Equals(HostPortPair::FromURL( |
726 GURL(SPDY_PROXY_AUTH_ORIGIN)))); | 729 GURL(SPDY_PROXY_AUTH_ORIGIN)))); |
727 #endif | 730 #endif |
728 | 731 |
729 net_log_.AddEvent( | 732 net_log_.AddEvent( |
730 NetLog::TYPE_SPDY_SESSION_INITIALIZED, | 733 NetLog::TYPE_SPDY_SESSION_INITIALIZED, |
731 connection_->socket()->NetLog().source().ToEventParametersCallback()); | 734 connection_->socket()->NetLog().source().ToEventParametersCallback()); |
732 | 735 |
(...skipping 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3231 if (!queue->empty()) { | 3234 if (!queue->empty()) { |
3232 SpdyStreamId stream_id = queue->front(); | 3235 SpdyStreamId stream_id = queue->front(); |
3233 queue->pop_front(); | 3236 queue->pop_front(); |
3234 return stream_id; | 3237 return stream_id; |
3235 } | 3238 } |
3236 } | 3239 } |
3237 return 0; | 3240 return 0; |
3238 } | 3241 } |
3239 | 3242 |
3240 } // namespace net | 3243 } // namespace net |
OLD | NEW |