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

Unified Diff: Source/web/WebDOMActivityLogger.cpp

Issue 213783002: Pass current value of attributes to WebDOMActivityLogger Setter logs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Latest master Created 6 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 | « Source/core/html/HTMLEmbedElement.idl ('k') | public/web/WebDOMActivityLogger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDOMActivityLogger.cpp
diff --git a/Source/web/WebDOMActivityLogger.cpp b/Source/web/WebDOMActivityLogger.cpp
index ef7a085458eedbe83beea603f1f5a0dd332bd8b6..fe6c187766301f9ff97667f6bdbb11c418a546cc 100644
--- a/Source/web/WebDOMActivityLogger.cpp
+++ b/Source/web/WebDOMActivityLogger.cpp
@@ -49,18 +49,41 @@ public:
{
}
- virtual void log(const String& apiName, int argc, const v8::Handle<v8::Value>* argv, const String& extraInfo) OVERRIDE
+ virtual void logGetter(const String& apiName) OVERRIDE
{
- KURL url;
- String title;
- if (Document* document = currentDOMWindow(v8::Isolate::GetCurrent())->document()) {
- url = document->url();
- title = document->title();
- }
- m_domActivityLogger->log(WebString(apiName), argc, argv, WebString(extraInfo), WebURL(url), WebString(title));
+ m_domActivityLogger->logGetter(WebString(apiName), getURL(), getTitle());
+ }
+
+ virtual void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue) OVERRIDE
+ {
+ m_domActivityLogger->logSetter(WebString(apiName), newValue, getURL(), getTitle());
+ }
+
+ virtual void logSetter(const String& apiName, const v8::Handle<v8::Value>& newValue, const v8::Handle<v8::Value>& oldValue) OVERRIDE
+ {
+ m_domActivityLogger->logSetter(WebString(apiName), newValue, oldValue, getURL(), getTitle());
+ }
+
+ virtual void logMethod(const String& apiName, int argc, const v8::Handle<v8::Value>* argv) OVERRIDE
+ {
+ m_domActivityLogger->logMethod(WebString(apiName), argc, argv, getURL(), getTitle());
}
private:
+ WebURL getURL()
+ {
+ if (Document* document = currentDOMWindow(v8::Isolate::GetCurrent())->document())
+ return WebURL(document->url());
+ return WebURL();
+ }
+
+ WebString getTitle()
+ {
+ if (Document* document = currentDOMWindow(v8::Isolate::GetCurrent())->document())
+ return WebString(document->title());
+ return WebString();
+ }
+
OwnPtr<WebDOMActivityLogger> m_domActivityLogger;
};
« no previous file with comments | « Source/core/html/HTMLEmbedElement.idl ('k') | public/web/WebDOMActivityLogger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698