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

Unified Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 351923005: Refactoring activity logger. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 6 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 | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLButtonElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLAnchorElement.cpp
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
index 1c19c49c77136e3a3b0c0e55d0b59aea8579a2c0..e94d808541d61fff5b1c7bd9f82ff5da1c61e957 100644
--- a/Source/core/html/HTMLAnchorElement.cpp
+++ b/Source/core/html/HTMLAnchorElement.cpp
@@ -160,6 +160,22 @@ void HTMLAnchorElement::setActive(bool down)
ContainerNode::setActive(down);
}
+void HTMLAnchorElement::attributeWillChange(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& newValue)
+{
+ if (name == hrefAttr && inDocument()) {
+ V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivityLoggerIfIsolatedWorld();
+ if (activityLogger) {
+ Vector<String> argv;
+ argv.append("a");
+ argv.append(hrefAttr.toString());
+ argv.append(oldValue);
+ argv.append(newValue);
+ activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data());
+ }
+ }
+ HTMLElement::attributeWillChange(name, oldValue, newValue);
+}
+
void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == hrefAttr) {
« no previous file with comments | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLButtonElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698