Reland "Fix GetStats bytesSent/Received, wireup headerBytesSent/Received" This is a reland of fbde32e596f06893d6dda13eb7d29f4c251cf08b The chromium problem should be fixed with https://chromium-review.googlesource.com/c/chromium/src/+/1862437 Original change's description: > Fix GetStats bytesSent/Received, wireup headerBytesSent/Received > > Changes the standard GetStats, legacy GetStats unchanged. > > Bug: webrtc:10525 > Change-Id: Ie10fe8079f1d8b4cc6bbe513f6a2fc91477b5441 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156084 > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Reviewed-by: Henrik Boström <hbos@webrtc.org> > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > Commit-Queue: Niels Moller <nisse@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#29462} Tbr: kwiberg@webrtc.org Bug: webrtc:10525 Change-Id: I3b61f9535aa3f1fca2ed84f068233803d4ec9fe2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157045 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29485}
diff --git a/pc/stats_collector.h b/pc/stats_collector.h index fa9d587..041fe2f 100644 --- a/pc/stats_collector.h +++ b/pc/stats_collector.h
@@ -94,6 +94,8 @@ // ignored. void ClearUpdateStatsCacheForTest(); + bool UseStandardBytesStats() const { return use_standard_bytes_stats_; } + private: friend class StatsCollectorTest; @@ -143,6 +145,7 @@ // Raw pointer to the peer connection the statistics are gathered from. PeerConnectionInternal* const pc_; double stats_gathering_started_; + const bool use_standard_bytes_stats_; // TODO(tommi): We appear to be holding on to raw pointers to reference // counted objects? We should be using scoped_refptr here.