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

Side by Side Diff: Source/platform/scheduler/TracedTask.h

Issue 490913002: Adding flow traces for blink scheduler events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Straggling uin64 turned into an int Created 6 years, 3 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 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.
4
5 #ifndef TracedTask_h
6 #define TracedTask_h
7
8 #include "platform/Task.h"
9 #include "platform/TraceLocation.h"
10
11 namespace blink {
12
13 class Scheduler;
14
15 class TracedTask {
16 public:
17 typedef Function<void()> Task;
18
19 void run() const;
20
21 private:
22
23 // Constructor is private, with scheduler as a friend, to keep this
24 // class hidden to everyone apart from the scheduler.
Sami 2014/08/29 14:50:25 This is a fairly common pattern in Blink so I don'
picksi1 2014/09/01 11:06:51 Done.
25 friend Scheduler;
Sami 2014/08/29 14:50:25 nit: People tend to write "friend class Scheduler"
picksi1 2014/09/01 11:06:51 Done.
26 TracedTask(const Task&, const TraceLocation&, const char*, int);
Sami 2014/08/29 14:50:25 Both const char* and int should have a name here.
picksi1 2014/09/01 11:06:51 I'm keen to encapsulate the fact that a task ID en
27
28 unsigned long long m_FlowTraceID;
Sami 2014/08/29 14:50:25 Lower caps for members: m_flowTraceID This should
picksi1 2014/09/01 11:06:51 Done.
29 Task m_task;
30 TraceLocation m_location;
31 const char * m_name;
Sami 2014/08/29 14:50:25 No space before "*".
picksi1 2014/09/01 11:06:51 Done.
32
33 };
34
35 } // namespace blink
36
37 #endif // TracedTask_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698