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

Unified Diff: Source/core/dom/Element.cpp

Issue 986583002: Collect host of Web Component usage to send to RAPPOR (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move to Platform to align with other histogram/UMA methods Created 5 years, 9 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
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 6cffdfffd94cedcf11e41510ef3ce289e93b8e6b..b053ac9a615e1eee49c49382a8235997e5bfd09c 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -87,6 +87,7 @@
#include "core/frame/PinchViewport.h"
#include "core/frame/ScrollToOptions.h"
#include "core/frame/Settings.h"
+#include "core/frame/UseByOriginCounter.h"
#include "core/frame/UseCounter.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/ClassList.h"
@@ -1771,6 +1772,12 @@ CustomElementDefinition* Element::customElementDefinition() const
return nullptr;
}
+PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* scriptState, ExceptionState& exceptionState)
+{
+ UseByOriginCounter::count(scriptState, document(), UseByOriginCounter::Feature::ElementCreateShadowRoot);
+ return createShadowRoot(exceptionState);
+}
+
PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState)
{
if (alwaysCreateClosedShadowRoot())

Powered by Google App Engine
This is Rietveld 408576698