OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 } | 29 } |
30 private: | 30 private: |
31 const spdy::SpdyStreamId stream_id_; | 31 const spdy::SpdyStreamId stream_id_; |
32 const int delta_; | 32 const int delta_; |
33 const int window_size_; | 33 const int window_size_; |
34 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamWindowUpdateParameter); | 34 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamWindowUpdateParameter); |
35 }; | 35 }; |
36 | 36 |
37 } | 37 } |
38 | 38 |
39 ScopedBandwidthMetrics::ScopedBandwidthMetrics() | |
ukai
2010/12/08 01:44:15
don't we have net/base/bandwidth_metrics.cc ?
I d
willchan no longer on Chromium
2010/12/08 04:02:47
Wow, I totally missed this. I agree completely.
Satish
2010/12/08 12:58:22
We didn't have net/base/bandwidth_metrics.cc and I
| |
40 : metrics_(Singleton<BandwidthMetrics>::get()), | |
41 started_(false) { | |
42 } | |
43 | |
39 SpdyStream::SpdyStream(SpdySession* session, | 44 SpdyStream::SpdyStream(SpdySession* session, |
40 spdy::SpdyStreamId stream_id, | 45 spdy::SpdyStreamId stream_id, |
41 bool pushed, | 46 bool pushed, |
42 const BoundNetLog& net_log) | 47 const BoundNetLog& net_log) |
43 : continue_buffering_data_(true), | 48 : continue_buffering_data_(true), |
44 stream_id_(stream_id), | 49 stream_id_(stream_id), |
45 priority_(0), | 50 priority_(0), |
46 stalled_by_flow_control_(false), | 51 stalled_by_flow_control_(false), |
47 send_window_size_(spdy::kSpdyStreamInitialWindowSize), | 52 send_window_size_(spdy::kSpdyStreamInitialWindowSize), |
48 recv_window_size_(spdy::kSpdyStreamInitialWindowSize), | 53 recv_window_size_(spdy::kSpdyStreamInitialWindowSize), |
49 pushed_(pushed), | 54 pushed_(pushed), |
50 metrics_(Singleton<BandwidthMetrics>::get()), | |
51 response_received_(false), | 55 response_received_(false), |
52 session_(session), | 56 session_(session), |
53 delegate_(NULL), | 57 delegate_(NULL), |
54 request_time_(base::Time::Now()), | 58 request_time_(base::Time::Now()), |
55 response_(new spdy::SpdyHeaderBlock), | 59 response_(new spdy::SpdyHeaderBlock), |
56 io_state_(STATE_NONE), | 60 io_state_(STATE_NONE), |
57 response_status_(OK), | 61 response_status_(OK), |
58 cancelled_(false), | 62 cancelled_(false), |
59 has_upload_data_(false), | 63 has_upload_data_(false), |
60 net_log_(net_log), | 64 net_log_(net_log), |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
541 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", | 545 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", |
542 recv_last_byte_time_ - recv_first_byte_time_); | 546 recv_last_byte_time_ - recv_first_byte_time_); |
543 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", | 547 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", |
544 recv_last_byte_time_ - send_time_); | 548 recv_last_byte_time_ - send_time_); |
545 | 549 |
546 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); | 550 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); |
547 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); | 551 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); |
548 } | 552 } |
549 | 553 |
550 } // namespace net | 554 } // namespace net |
OLD | NEW |