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

Unified Diff: Source/platform/scheduler/TracedTask.h

Issue 656463004: Use the scheduling mechanism provided by the platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Mike's comments. Created 6 years, 2 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
« no previous file with comments | « Source/platform/scheduler/SchedulerTest.cpp ('k') | Source/platform/scheduler/TracedTask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scheduler/TracedTask.h
diff --git a/Source/platform/scheduler/TracedTask.h b/Source/platform/scheduler/TracedTask.h
deleted file mode 100644
index 1a3296e594281e3993923da8c65b67702af17abf..0000000000000000000000000000000000000000
--- a/Source/platform/scheduler/TracedTask.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef TracedTask_h
-#define TracedTask_h
-
-#include "platform/Task.h"
-#include "platform/TraceEvent.h"
-#include "platform/TraceLocation.h"
-
-namespace blink {
-namespace internal {
-
-#ifdef MANGLE_COMPILES_ON_WIN_OK
-// TODO: Once win version compiles correctly when using TRACE_ID_MANGLE remove
-// the ifdef to always mangle
-#define MANGLE(id) TRACE_ID_MANGLE(id)
-#else
-#define MANGLE(id) (id)
-#endif
-
-class TracedTask {
-public:
- virtual void run() const = 0;
- virtual ~TracedTask();
-
-protected:
- TracedTask(const TraceLocation&, const char* traceName);
- TraceLocation getLocation() const;
- const char* getTraceName() const;
- void endFlowTraceEvent() const;
-
-private:
- // Declared volatile as it is atomically incremented.
- static volatile int s_nextFlowTraceID;
-
- uint64_t m_flowTraceID;
- TraceLocation m_location;
- const char* m_traceName;
-};
-
-class TracedStandardTask : public TracedTask {
-public:
- typedef Function<void()> Task;
-
- static PassOwnPtr<TracedStandardTask> Create(const Task&, const TraceLocation&, const char* traceName);
- virtual void run() const;
- virtual ~TracedStandardTask();
-
-private:
- TracedStandardTask(const Task&, const TraceLocation&, const char* traceName);
- Task m_task;
-};
-
-class TracedIdleTask : public TracedTask {
-public:
- typedef Function<void(double deadlineSeconds)> IdleTask;
-
- static PassOwnPtr<TracedIdleTask> Create(const IdleTask&, const TraceLocation&, const char* traceName);
- virtual void run() const;
- virtual ~TracedIdleTask();
-
-private:
- TracedIdleTask(const IdleTask&, const TraceLocation&, const char* traceName);
- IdleTask m_idleTask;
-};
-
-} // namespace internal
-} // namespace blink
-
-#endif // TracedTask_h
« no previous file with comments | « Source/platform/scheduler/SchedulerTest.cpp ('k') | Source/platform/scheduler/TracedTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698