| Index: webrtc/video/receive_statistics_proxy.cc
 | 
| diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
 | 
| index 2ed2faeb3754c344f670c355e0e0505eac4e5e3a..2bd118b004b20ebc0e84e3a8faee1effffc5a6a4 100644
 | 
| --- a/webrtc/video/receive_statistics_proxy.cc
 | 
| +++ b/webrtc/video/receive_statistics_proxy.cc
 | 
| @@ -74,6 +74,8 @@ ReceiveStatisticsProxy::ReceiveStatisticsProxy(
 | 
|        render_fps_tracker_(100, 10u),
 | 
|        render_pixel_tracker_(100, 10u),
 | 
|        total_byte_tracker_(100, 10u),  // bucket_interval_ms, bucket_count
 | 
| +      e2e_delay_max_ms_video_(-1),
 | 
| +      e2e_delay_max_ms_screenshare_(-1),
 | 
|        freq_offset_counter_(clock, nullptr, kFreqOffsetProcessIntervalMs),
 | 
|        first_report_block_time_ms_(-1),
 | 
|        avg_rtt_ms_(0) {
 | 
| @@ -169,9 +171,30 @@ void ReceiveStatisticsProxy::UpdateHistograms() {
 | 
|    if (delay_ms != -1)
 | 
|      RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
 | 
|  
 | 
| -  int e2e_delay_ms = e2e_delay_counter_.Avg(kMinRequiredSamples);
 | 
| -  if (e2e_delay_ms != -1)
 | 
| -    RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.EndToEndDelayInMs", e2e_delay_ms);
 | 
| +  int e2e_delay_ms_video = e2e_delay_counter_video_.Avg(kMinRequiredSamples);
 | 
| +  if (e2e_delay_ms_video != -1) {
 | 
| +    RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.EndToEndDelayInMs",
 | 
| +                               e2e_delay_ms_video);
 | 
| +  }
 | 
| +
 | 
| +  int e2e_delay_ms_screenshare =
 | 
| +      e2e_delay_counter_screenshare_.Avg(kMinRequiredSamples);
 | 
| +  if (e2e_delay_ms_screenshare != -1) {
 | 
| +    RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.EndToEndDelayInMs",
 | 
| +                               e2e_delay_ms_screenshare);
 | 
| +  }
 | 
| +
 | 
| +  int e2e_delay_max_ms_video = e2e_delay_max_ms_video_;
 | 
| +  if (e2e_delay_max_ms_video != -1) {
 | 
| +    RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.EndToEndDelayMaxInMs",
 | 
| +                                e2e_delay_max_ms_video);
 | 
| +  }
 | 
| +
 | 
| +  int e2e_delay_max_ms_screenshare = e2e_delay_max_ms_screenshare_;
 | 
| +  if (e2e_delay_max_ms_screenshare != -1) {
 | 
| +    RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.Screenshare.EndToEndDelayMaxInMs",
 | 
| +                                e2e_delay_max_ms_screenshare);
 | 
| +  }
 | 
|  
 | 
|    StreamDataCounters rtp = stats_.rtp_stats;
 | 
|    StreamDataCounters rtx;
 | 
| @@ -475,8 +498,16 @@ void ReceiveStatisticsProxy::OnRenderedFrame(const VideoFrame& frame) {
 | 
|  
 | 
|    if (frame.ntp_time_ms() > 0) {
 | 
|      int64_t delay_ms = clock_->CurrentNtpInMilliseconds() - frame.ntp_time_ms();
 | 
| -    if (delay_ms >= 0)
 | 
| -      e2e_delay_counter_.Add(delay_ms);
 | 
| +    if (delay_ms >= 0) {
 | 
| +      if (frame.content_type() == VideoContentType::kScreenshare) {
 | 
| +        e2e_delay_max_ms_screenshare_ =
 | 
| +            std::max(delay_ms, e2e_delay_max_ms_screenshare_);
 | 
| +        e2e_delay_counter_screenshare_.Add(delay_ms);
 | 
| +      } else {
 | 
| +        e2e_delay_max_ms_video_ = std::max(delay_ms, e2e_delay_max_ms_video_);
 | 
| +        e2e_delay_counter_video_.Add(delay_ms);
 | 
| +      }
 | 
| +    }
 | 
|    }
 | 
|  }
 | 
|  
 | 
| 
 |