Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: content/renderer/media/peer_connection_tracker.cc

Issue 13859011: Fixes webrtc-internals stats reporting for the new stats API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/resources/media/webrtc_internals.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/peer_connection_tracker.cc
diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc
index b2d15ac17d8df6a56d6b7f04a35fdc822dfa89e5..6bc9fe9f87eb1b786b780bcc86cf665446b8335e 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -152,6 +152,9 @@ static string GetIceGatheringStateString(
// Builds a DictionaryValue from the StatsReport.
// The caller takes the ownership of the returned value.
+// Note:
+// The format must be consistent with what webrtc_internals.js expects.
+// If you change it here, you must change webrtc_internals.js as well.
static DictionaryValue* GetDictValueStats(const webrtc::StatsReport& report) {
if (report.values.empty())
return NULL;
@@ -188,6 +191,9 @@ static DictionaryValue* GetDictValue(const webrtc::StatsReport& report) {
if (!result)
return NULL;
+ // Note:
+ // The format must be consistent with what webrtc_internals.js expects.
+ // If you change it here, you must change webrtc_internals.js as well.
if (stats)
result->Set("stats", stats.release());
result->SetString("id", report.id);
« no previous file with comments | « content/browser/resources/media/webrtc_internals.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698