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

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 640c8109986dde4ea7497ccc85ea1b63d27d5403..2682816baf63ab48c5c8966ac3c4408cbf2f795b 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
+++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -730,6 +730,17 @@ 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;
+ SecurityOrigin* securityOrigin = frame->securityContext()->securityOrigin();
+ Frame* parent = frame->tree().parent();
+ if (parent && !securityOrigin->canAccess(parent->securityContext()->securityOrigin()))
mlamouri (slow - plz ping) 2016/01/19 17:54:48 canAccess() is not exactly "cross origin". Maybe t
raymes 2016/01/20 00:13:12 Done. Actually you made me realise that this code
+ count(frame, feature);
+}
+
static const char* milestoneString(int milestone)
{
switch (milestone) {

Powered by Google App Engine
This is Rietveld 408576698