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

Unified Diff: third_party/WebKit/Source/core/page/FrameTree.cpp

Issue 2795673002: Added UseCounter for clearing browsing context name on cross-origin name (Closed)
Patch Set: RU Created 3 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 | « third_party/WebKit/Source/core/page/FrameTree.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FrameTree.cpp
diff --git a/third_party/WebKit/Source/core/page/FrameTree.cpp b/third_party/WebKit/Source/core/page/FrameTree.cpp
index 30fb11c9cd328902411bd98e44a7d53a075537ab..446ecd6ce0a3938691e4667b4beb9b3d4d773b79 100644
--- a/third_party/WebKit/Source/core/page/FrameTree.cpp
+++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -26,6 +26,7 @@
#include "core/frame/LocalFrame.h"
#include "core/frame/RemoteFrame.h"
#include "core/frame/RemoteFrameView.h"
+#include "core/frame/UseCounter.h"
#include "core/page/Page.h"
#include "wtf/Assertions.h"
#include "wtf/Vector.h"
@@ -47,7 +48,23 @@ FrameTree::FrameTree(Frame* thisFrame)
FrameTree::~FrameTree() {}
+const AtomicString& FrameTree::name() const {
+ // TODO(andypaicu): remove this once we have gathered the data
+ if (m_experimentalSetNulledName) {
+ UseCounter::count(m_thisFrame.get(),
+ UseCounter::CrossOriginMainFrameNulledNameAccessed);
+ }
+ return m_name;
+}
+
+// TODO(andypaicu): remove this once we have gathered the data
+void FrameTree::experimentalSetNulledName() {
+ m_experimentalSetNulledName = true;
+}
+
void FrameTree::setName(const AtomicString& name) {
+ // TODO(andypaicu): remove this once we have gathered the data
+ m_experimentalSetNulledName = false;
m_name = name;
}
« no previous file with comments | « third_party/WebKit/Source/core/page/FrameTree.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698