| 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)
|
|
|