| Index: content/renderer/media/mock_peer_connection_impl.cc
|
| diff --git a/content/renderer/media/mock_peer_connection_impl.cc b/content/renderer/media/mock_peer_connection_impl.cc
|
| index 13bd548d6fd3106f10475e0cd7897a4f7279ef8a..7a09ea36126bb51b6c0cbd1e6059d2b98746ae2a 100644
|
| --- a/content/renderer/media/mock_peer_connection_impl.cc
|
| +++ b/content/renderer/media/mock_peer_connection_impl.cc
|
| @@ -269,33 +269,35 @@ bool MockPeerConnectionImpl::GetStats(
|
| return false;
|
|
|
| DCHECK_EQ(kStatsOutputLevelStandard, level);
|
| - std::vector<webrtc::StatsReport> reports(track ? 1 : 2);
|
| - webrtc::StatsReport& report = reports[0];
|
| - report.id = "1234";
|
| - report.type = "ssrc";
|
| - report.timestamp = 42;
|
| - webrtc::StatsReport::Value value = {
|
| - webrtc::StatsReport::kStatsValueNameFingerprint,
|
| - "trackvalue"
|
| - };
|
| - report.values.push_back(value);
|
| + webrtc::StatsReport report1, report2;
|
| + report1.id = "1234";
|
| + report1.type = "ssrc";
|
| + report1.timestamp = 42;
|
| + report1.values.push_back(
|
| + webrtc::StatsReport::Value(
|
| + webrtc::StatsReport::kStatsValueNameFingerprint,
|
| + "trackvalue"));
|
| +
|
| + std::vector<webrtc::StatsReport> reports;
|
| + reports.push_back(report1);
|
| +
|
| // If selector is given, we pass back one report.
|
| // If selector is not given, we pass back two.
|
| if (!track) {
|
| - webrtc::StatsReport& report2 = reports[1];
|
| report2.id = "nontrack";
|
| report2.type = "generic";
|
| report2.timestamp = 44;
|
| - report2.values.push_back(value);
|
| - webrtc::StatsReport::Value value2 = {
|
| - webrtc::StatsReport::kStatsValueNameFingerprintAlgorithm,
|
| - "somevalue"
|
| - };
|
| - report2.values.push_back(value2);
|
| + report2.values.push_back(
|
| + webrtc::StatsReport::Value(
|
| + webrtc::StatsReport::kStatsValueNameFingerprintAlgorithm,
|
| + "somevalue"));
|
| + reports.push_back(report2);
|
| }
|
| +
|
| // Note that the callback is synchronous, not asynchronous; it will
|
| // happen before the request call completes.
|
| observer->OnComplete(reports);
|
| +
|
| return true;
|
| }
|
|
|
|
|