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

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

Issue 351923005: Refactoring activity logger. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/html/HTMLButtonElement.cpp
diff --git a/Source/core/html/HTMLButtonElement.cpp b/Source/core/html/HTMLButtonElement.cpp
index 7051b4a4aa282f413a0e24512906bb98a577abf2..fde6438b57c60e08116095163f6347ce91b6c0a4 100644
--- a/Source/core/html/HTMLButtonElement.cpp
+++ b/Source/core/html/HTMLButtonElement.cpp
@@ -230,4 +230,20 @@ Node::InsertionNotificationRequest HTMLButtonElement::insertedInto(ContainerNode
return HTMLFormControlElement::insertedInto(insertionPoint);
}
+void HTMLButtonElement::attributeWillChange(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& newValue)
+{
+ if (name == formactionAttr && inDocument()) {
+ V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivityLoggerIfIsolatedWorld();
+ if (activityLogger) {
+ Vector<String> argv;
+ argv.append("button");
+ argv.append(formactionAttr.toString());
+ argv.append(oldValue);
+ argv.append(newValue);
+ activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data());
+ }
+ }
+ HTMLFormControlElement::attributeWillChange(name, oldValue, newValue);
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698