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_stream.h" | 5 #include "net/spdy/spdy_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 net_log_(net_log), | 73 net_log_(net_log), |
74 send_bytes_(0), | 74 send_bytes_(0), |
75 recv_bytes_(0), | 75 recv_bytes_(0), |
76 domain_bound_cert_type_(CLIENT_CERT_INVALID_TYPE), | 76 domain_bound_cert_type_(CLIENT_CERT_INVALID_TYPE), |
77 domain_bound_cert_request_handle_(NULL) { | 77 domain_bound_cert_request_handle_(NULL) { |
78 } | 78 } |
79 | 79 |
80 class SpdyStream::SpdyStreamIOBufferProducer | 80 class SpdyStream::SpdyStreamIOBufferProducer |
81 : public SpdySession::SpdyIOBufferProducer { | 81 : public SpdySession::SpdyIOBufferProducer { |
82 public: | 82 public: |
83 SpdyStreamIOBufferProducer(SpdyStream* stream) : stream_(stream) {} | 83 explicit SpdyStreamIOBufferProducer(SpdyStream* stream) : stream_(stream) {} |
84 | 84 |
85 // SpdyFrameProducer | 85 // SpdyFrameProducer |
86 virtual RequestPriority GetPriority() const OVERRIDE { | 86 virtual RequestPriority GetPriority() const OVERRIDE { |
87 return stream_->priority(); | 87 return stream_->priority(); |
88 } | 88 } |
89 | 89 |
90 virtual SpdyIOBuffer* ProduceNextBuffer(SpdySession* session) OVERRIDE { | 90 virtual SpdyIOBuffer* ProduceNextBuffer(SpdySession* session) OVERRIDE { |
91 if (stream_->cancelled()) | 91 if (stream_->cancelled()) |
92 return NULL; | 92 return NULL; |
93 if (stream_->stream_id() == 0) | 93 if (stream_->stream_id() == 0) |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", | 858 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", |
859 recv_last_byte_time_ - recv_first_byte_time_); | 859 recv_last_byte_time_ - recv_first_byte_time_); |
860 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", | 860 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", |
861 recv_last_byte_time_ - send_time_); | 861 recv_last_byte_time_ - send_time_); |
862 | 862 |
863 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); | 863 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); |
864 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); | 864 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); |
865 } | 865 } |
866 | 866 |
867 } // namespace net | 867 } // namespace net |
OLD | NEW |