Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: net/quic/quic_sustained_bandwidth_recorder.h

Issue 495233002: QUIC minor clean up to keep in sync with internal sources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Move_least_packet_awaited_by_peer_73630593
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_dispatcher.h ('k') | net/quic/quic_sustained_bandwidth_recorder_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef NET_QUIC_QUIC_SUSTAINED_BANDWIDTH_RECORDER_H_ 5 #ifndef NET_QUIC_QUIC_SUSTAINED_BANDWIDTH_RECORDER_H_
6 #define NET_QUIC_QUIC_SUSTAINED_BANDWIDTH_RECORDER_H_ 6 #define NET_QUIC_QUIC_SUSTAINED_BANDWIDTH_RECORDER_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/quic/quic_bandwidth.h" 9 #include "net/quic/quic_bandwidth.h"
10 #include "net/quic/quic_time.h" 10 #include "net/quic/quic_time.h"
(...skipping 30 matching lines...) Expand all
41 QuicBandwidth BandwidthEstimate() const { 41 QuicBandwidth BandwidthEstimate() const {
42 DCHECK(has_estimate_); 42 DCHECK(has_estimate_);
43 return bandwidth_estimate_; 43 return bandwidth_estimate_;
44 } 44 }
45 45
46 QuicBandwidth MaxBandwidthEstimate() const { 46 QuicBandwidth MaxBandwidthEstimate() const {
47 DCHECK(has_estimate_); 47 DCHECK(has_estimate_);
48 return max_bandwidth_estimate_; 48 return max_bandwidth_estimate_;
49 } 49 }
50 50
51 int32 MaxBandwidthTimestamp() const { 51 int64 MaxBandwidthTimestamp() const {
52 DCHECK(has_estimate_); 52 DCHECK(has_estimate_);
53 return max_bandwidth_timestamp_; 53 return max_bandwidth_timestamp_;
54 } 54 }
55 55
56 bool EstimateRecordedDuringSlowStart() const { 56 bool EstimateRecordedDuringSlowStart() const {
57 DCHECK(has_estimate_); 57 DCHECK(has_estimate_);
58 return bandwidth_estimate_recorded_during_slow_start_; 58 return bandwidth_estimate_recorded_during_slow_start_;
59 } 59 }
60 60
61 private: 61 private:
(...skipping 10 matching lines...) Expand all
72 // slow start. 72 // slow start.
73 bool bandwidth_estimate_recorded_during_slow_start_; 73 bool bandwidth_estimate_recorded_during_slow_start_;
74 74
75 // The latest sustained bandwidth estimate. 75 // The latest sustained bandwidth estimate.
76 QuicBandwidth bandwidth_estimate_; 76 QuicBandwidth bandwidth_estimate_;
77 77
78 // The maximum sustained bandwidth seen over the lifetime of the connection. 78 // The maximum sustained bandwidth seen over the lifetime of the connection.
79 QuicBandwidth max_bandwidth_estimate_; 79 QuicBandwidth max_bandwidth_estimate_;
80 80
81 // Timestamp indicating when the max_bandwidth_estimate_ was seen. 81 // Timestamp indicating when the max_bandwidth_estimate_ was seen.
82 int32 max_bandwidth_timestamp_; 82 int64 max_bandwidth_timestamp_;
83 83
84 // Timestamp marking the beginning of the latest recording period. 84 // Timestamp marking the beginning of the latest recording period.
85 QuicTime start_time_; 85 QuicTime start_time_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(QuicSustainedBandwidthRecorder); 87 DISALLOW_COPY_AND_ASSIGN(QuicSustainedBandwidthRecorder);
88 }; 88 };
89 89
90 } // namespace net 90 } // namespace net
91 91
92 #endif // NET_QUIC_QUIC_SUSTAINED_BANDWIDTH_RECORDER_H_ 92 #endif // NET_QUIC_QUIC_SUSTAINED_BANDWIDTH_RECORDER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_dispatcher.h ('k') | net/quic/quic_sustained_bandwidth_recorder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698