OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "platform/instrumentation/PlatformTraceEventsAgent.h" |
| 6 |
| 7 #include "platform/instrumentation/PlatformInstrumentation.h" |
| 8 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 9 #include "platform/instrumentation/tracing/TracedValue.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 namespace { |
| 14 |
| 15 std::unique_ptr<TracedValue> buildData( |
| 16 const probe::PlatformSendRequest& probe) { |
| 17 std::unique_ptr<TracedValue> value = TracedValue::create(); |
| 18 value->setString("id", String::number(probe.identifier)); |
| 19 return value; |
| 20 } |
| 21 |
| 22 } // namespace |
| 23 |
| 24 void PlatformTraceEventsAgent::will(const probe::PlatformSendRequest& probe) { |
| 25 TRACE_EVENT_BEGIN1("devtools.timeline", "PlatformResourceSendRequest", "data", |
| 26 buildData(probe)); |
| 27 } |
| 28 |
| 29 void PlatformTraceEventsAgent::did(const probe::PlatformSendRequest& probe) { |
| 30 TRACE_EVENT_END0("devtools.timeline", "PlatformResourceSendRequest"); |
| 31 } |
| 32 |
| 33 } // namespace blink |
OLD | NEW |