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

Unified Diff: third_party/WebKit/Source/core/frame/UseCounter.cpp

Issue 1578263006: Add metrics for usage of permission features from iframes in blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: third_party/WebKit/Source/core/frame/UseCounter.cpp
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp
index fb5b10670ed70e5eba1e36336e580c56851bf0de..d0bd56bd08244de9d7622c72f894eac7f03dfa6d 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
+++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -730,6 +730,18 @@ void UseCounter::countDeprecationIfNotPrivateScript(v8::Isolate* isolate, Execut
UseCounter::countDeprecation(context, feature);
}
+void UseCounter::countCrossOriginIframe(const Document& document, Feature feature)
+{
+ Frame* frame = document.frame();
+ if (!frame)
+ return;
+ // Check to see if the frame can script into the top level document.
+ SecurityOrigin* securityOrigin = frame->securityContext()->securityOrigin();
+ Frame* top = frame->tree().top();
+ if (top && !securityOrigin->canAccess(top->securityContext()->securityOrigin()))
+ count(frame, feature);
+}
+
static const char* milestoneString(int milestone)
{
switch (milestone) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/page/PointerLockController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698