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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp

Issue 2753183002: DevTools: migrate remaining parse html probe to probes. (Closed)
Patch Set: review comment addressed. Created 3 years, 9 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/inspector/InspectorTraceEvents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
index 978f3ba70da7ddc74c62000c5f3b9a65243d2af6..294f93ca994abd3eb71aa3148adcdaee84f79b6f 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
@@ -51,6 +51,22 @@ void* asyncId(unsigned long identifier) {
return reinterpret_cast<void*>((identifier << 1) | 1);
}
+std::unique_ptr<TracedValue> inspectorParseHtmlBeginData(Document* document,
+ unsigned startLine) {
+ std::unique_ptr<TracedValue> value = TracedValue::create();
+ value->setInteger("startLine", startLine);
+ value->setString("frame", toHexString(document->frame()));
+ value->setString("url", document->url().getString());
+ setCallStack(value.get());
+ return value;
+}
+
+std::unique_ptr<TracedValue> inspectorParseHtmlEndData(unsigned endLine) {
+ std::unique_ptr<TracedValue> value = TracedValue::create();
+ value->setInteger("endLine", endLine);
+ return value;
+}
+
} // namespace
String toHexString(const void* p) {
@@ -159,14 +175,14 @@ void InspectorTraceEvents::will(const probe::ParseHTML& probe) {
// FIXME: Pass in current input length.
TRACE_EVENT_BEGIN1(
"devtools.timeline", "ParseHTML", "beginData",
- InspectorParseHtmlEvent::beginData(
- probe.parser->document(), probe.parser->lineNumber().zeroBasedInt()));
+ inspectorParseHtmlBeginData(probe.parser->document(),
+ probe.parser->lineNumber().zeroBasedInt()));
}
void InspectorTraceEvents::did(const probe::ParseHTML& probe) {
- TRACE_EVENT_END1("devtools.timeline", "ParseHTML", "endData",
- InspectorParseHtmlEvent::endData(
- probe.parser->lineNumber().zeroBasedInt() - 1));
+ TRACE_EVENT_END1(
+ "devtools.timeline", "ParseHTML", "endData",
+ inspectorParseHtmlEndData(probe.parser->lineNumber().zeroBasedInt() - 1));
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"),
"UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data",
InspectorUpdateCountersEvent::data());
@@ -829,24 +845,6 @@ std::unique_ptr<TracedValue> InspectorIdleCallbackFireEvent::data(
return value;
}
-std::unique_ptr<TracedValue> InspectorParseHtmlEvent::beginData(
- Document* document,
- unsigned startLine) {
- std::unique_ptr<TracedValue> value = TracedValue::create();
- value->setInteger("startLine", startLine);
- value->setString("frame", toHexString(document->frame()));
- value->setString("url", document->url().getString());
- setCallStack(value.get());
- return value;
-}
-
-std::unique_ptr<TracedValue> InspectorParseHtmlEvent::endData(
- unsigned endLine) {
- std::unique_ptr<TracedValue> value = TracedValue::create();
- value->setInteger("endLine", endLine);
- return value;
-}
-
std::unique_ptr<TracedValue> InspectorParseAuthorStyleSheetEvent::data(
const CSSStyleSheetResource* cachedStyleSheet) {
std::unique_ptr<TracedValue> value = TracedValue::create();
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698