Ensure that PC usage is recorded if a PC is alive for 60 seconds.
Bug: chromium:718508
Change-Id: Id2cbcb370b56cb8a6a6c821e0f89c51089cc8e6b
Reviewed-on: https://webrtc-review.googlesource.com/83140
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23723}
diff --git a/pc/peerconnection.h b/pc/peerconnection.h
index 0e8b71d..8901848 100644
--- a/pc/peerconnection.h
+++ b/pc/peerconnection.h
@@ -265,6 +265,10 @@
bool NeedsIceRestart(const std::string& content_name) const override;
bool GetSslRole(const std::string& content_name, rtc::SSLRole* role) override;
+ void ReturnHistogramVeryQuicklyForTesting() {
+ return_histogram_very_quickly_ = true;
+ }
+
protected:
~PeerConnection() override;
@@ -1017,6 +1021,7 @@
cricket::VideoOptions video_options_;
int usage_event_accumulator_ = 0;
+ bool return_histogram_very_quickly_ = false;
};
} // namespace webrtc