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

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.cpp

Issue 2490543002: Measure usage of RTCSessionDescription's type and sdp attributes (Closed)
Patch Set: add missing "be" Created 4 years, 1 month 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
Index: third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.cpp
index 38b4e1ad98606be97945885ec3dd83709feaf5b7..9df0f6c352491a6fd4d26d98fb7b62fedfdf60de 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.cpp
@@ -32,19 +32,26 @@
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/V8ObjectBuilder.h"
+#include "core/dom/ExecutionContext.h"
+#include "core/frame/UseCounter.h"
#include "modules/peerconnection/RTCSessionDescriptionInit.h"
namespace blink {
RTCSessionDescription* RTCSessionDescription::create(
+ ExecutionContext* context,
const RTCSessionDescriptionInit& descriptionInitDict) {
String type;
if (descriptionInitDict.hasType())
type = descriptionInitDict.type();
+ else
+ UseCounter::count(context, UseCounter::RTCSessionDescriptionInitNoType);
String sdp;
if (descriptionInitDict.hasSdp())
sdp = descriptionInitDict.sdp();
+ else
+ UseCounter::count(context, UseCounter::RTCSessionDescriptionInitNoSdp);
return new RTCSessionDescription(WebRTCSessionDescription(type, sdp));
}

Powered by Google App Engine
This is Rietveld 408576698