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

Side by Side Diff: third_party/WebKit/Source/platform/instrumentation/PlatformTraceEventsAgent.cpp

Issue 2760363002: [instrumentation] Generalize instrumentation to be used beyond the core layer (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698