1 // Copyright 2014 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.
8 #include "platform/Task.h"
9 #include "platform/TraceEvent.h"
10 #include "platform/TraceLocation.h"
14 #ifdef MANGLE_COMPILES_ON_WIN_OK
15 // TODO: Once win version compiles correctly when using TRACE_ID_MANGLE remove
16 // the ifdef to always mangle
17 #define MANGLE(id) TRACE_ID_MANGLE(id)
19 #define MANGLE(id) (id)
24 typedef Function<void()> Task;
29 friend class Scheduler;
30 TracedTask(const Task&, const TraceLocation&, const char* traceName);
32 // Declared volatile as it is atomically incremented.
33 static volatile int s_nextFlowTraceID;
35 uint64_t m_flowTraceID;
37 TraceLocation m_location;
38 const char* m_traceName;
43 #endif // TracedTask_h