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

Unified Diff: third_party/WebKit/Source/platform/probe/PlatformProbes.cpp

Issue 2772613002: [instrumentation] Rename InspectorInstrumentation into CoreProbes (Closed)
Patch Set: fix typo 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
Index: third_party/WebKit/Source/platform/probe/PlatformProbes.cpp
diff --git a/third_party/WebKit/Source/platform/instrumentation/PlatformTraceEventsAgent.h b/third_party/WebKit/Source/platform/probe/PlatformProbes.cpp
similarity index 31%
copy from third_party/WebKit/Source/platform/instrumentation/PlatformTraceEventsAgent.h
copy to third_party/WebKit/Source/platform/probe/PlatformProbes.cpp
index 9428d66240b7efc99291fa984834e9a156234cd9..2a1dbd9b9da885516ce12cccd8ca4596bcec13b7 100644
--- a/third_party/WebKit/Source/platform/instrumentation/PlatformTraceEventsAgent.h
+++ b/third_party/WebKit/Source/platform/probe/PlatformProbes.cpp
@@ -2,28 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PlatformTraceEventsAgent_h
-#define PlatformTraceEventsAgent_h
-
-#include "platform/PlatformExport.h"
-#include "platform/heap/Heap.h"
-#include "platform/instrumentation/tracing/TraceEvent.h"
+#include "platform/probe/PlatformProbes.h"
namespace blink {
-
namespace probe {
-class PlatformSendRequest;
+
+double ProbeBase::captureStartTime() const {
+ if (!m_startTime)
+ m_startTime = monotonicallyIncreasingTime();
+ return m_startTime;
}
-class PLATFORM_EXPORT PlatformTraceEventsAgent
- : public GarbageCollected<PlatformTraceEventsAgent> {
- public:
- DEFINE_INLINE_TRACE() {}
+double ProbeBase::captureEndTime() const {
+ if (!m_endTime)
+ m_endTime = monotonicallyIncreasingTime();
+ return m_endTime;
+}
- void will(const probe::PlatformSendRequest&);
- void did(const probe::PlatformSendRequest&);
-};
+double ProbeBase::duration() const {
+ DCHECK(m_startTime);
+ return captureEndTime() - m_startTime;
+}
+} // namespace probe
} // namespace blink
-
-#endif // !defined(PlatformTraceEventsAgent_h)

Powered by Google App Engine
This is Rietveld 408576698