| Index: content/renderer/media/rtc_peer_connection_handler.cc
|
| diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
|
| index 0c5c3737cf153f2ca680d981e502701bb4301220..3d096b4af1f5771896b64522cbeb0a02e450e5a8 100644
|
| --- a/content/renderer/media/rtc_peer_connection_handler.cc
|
| +++ b/content/renderer/media/rtc_peer_connection_handler.cc
|
| @@ -233,7 +233,10 @@ class SetSessionDescriptionRequest
|
| class StatsResponse : public webrtc::StatsObserver {
|
| public:
|
| explicit StatsResponse(const scoped_refptr<LocalRTCStatsRequest>& request)
|
| - : request_(request.get()), response_(request_->createResponse().get()) {}
|
| + : request_(request.get()), response_(request_->createResponse().get()) {
|
| + // Measure the overall time it takes to satisfy a getStats request.
|
| + TRACE_EVENT_ASYNC_BEGIN0("webrtc", "getStats_Native", this);
|
| + }
|
|
|
| virtual void OnComplete(
|
| const std::vector<webrtc::StatsReport>& reports) OVERRIDE {
|
| @@ -244,6 +247,12 @@ class StatsResponse : public webrtc::StatsObserver {
|
| AddReport(*it);
|
| }
|
| }
|
| +
|
| + // Record the getSync operation as done before calling into Blink so that
|
| + // we don't skew the perf measurements of the native code with whatever the
|
| + // callback might be doing.
|
| + TRACE_EVENT_ASYNC_END0("webrtc", "getStats_Native", this);
|
| +
|
| request_->requestSucceeded(response_);
|
| }
|
|
|
|
|