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

Unified Diff: webrtc/modules/congestion_controller/probe_controller.h

Issue 2574533002: Fix integer overflow in ProbeController. (Closed)
Patch Set: . Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/congestion_controller/probe_controller.h
diff --git a/webrtc/modules/congestion_controller/probe_controller.h b/webrtc/modules/congestion_controller/probe_controller.h
index 4faa8af3e3f487c3c459abdf2d22b82fb92dde8a..68e98d53792988d3c3d5719f0708203ae5b795db 100644
--- a/webrtc/modules/congestion_controller/probe_controller.h
+++ b/webrtc/modules/congestion_controller/probe_controller.h
@@ -28,13 +28,13 @@ class ProbeController {
public:
ProbeController(PacedSender* pacer, Clock* clock);
- void SetBitrates(int min_bitrate_bps,
- int start_bitrate_bps,
- int max_bitrate_bps);
+ void SetBitrates(int64_t min_bitrate_bps,
+ int64_t start_bitrate_bps,
+ int64_t max_bitrate_bps);
void OnNetworkStateChanged(NetworkState state);
- void SetEstimatedBitrate(int bitrate_bps);
+ void SetEstimatedBitrate(int64_t bitrate_bps);
void EnablePeriodicAlrProbing(bool enable);
void Process();
@@ -51,20 +51,19 @@ class ProbeController {
void InitiateExponentialProbing() EXCLUSIVE_LOCKS_REQUIRED(critsect_);
void InitiateProbing(int64_t now_ms,
- std::initializer_list<int> bitrates_to_probe,
- int min_bitrate_to_probe_further_bps)
- EXCLUSIVE_LOCKS_REQUIRED(critsect_);
+ std::initializer_list<int64_t> bitrates_to_probe,
+ bool probe_further) EXCLUSIVE_LOCKS_REQUIRED(critsect_);
rtc::CriticalSection critsect_;
PacedSender* const pacer_;
Clock* const clock_;
NetworkState network_state_ GUARDED_BY(critsect_);
State state_ GUARDED_BY(critsect_);
- int min_bitrate_to_probe_further_bps_ GUARDED_BY(critsect_);
+ int64_t min_bitrate_to_probe_further_bps_ GUARDED_BY(critsect_);
int64_t time_last_probing_initiated_ms_ GUARDED_BY(critsect_);
- int estimated_bitrate_bps_ GUARDED_BY(critsect_);
- int start_bitrate_bps_ GUARDED_BY(critsect_);
- int max_bitrate_bps_ GUARDED_BY(critsect_);
+ int64_t estimated_bitrate_bps_ GUARDED_BY(critsect_);
+ int64_t start_bitrate_bps_ GUARDED_BY(critsect_);
+ int64_t max_bitrate_bps_ GUARDED_BY(critsect_);
int64_t last_alr_probing_time_ GUARDED_BY(critsect_);
bool enable_periodic_alr_probing_ GUARDED_BY(critsect_);

Powered by Google App Engine
This is Rietveld 408576698