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

Unified Diff: base/message_loop/message_loop.h

Issue 455833004: base: Factor task debug annotations out of MessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Documentation. Created 6 years, 4 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 | « base/message_loop/incoming_task_queue.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 1d13b126b0a9f616bb6bc7c25167a85fe08fd1aa..39a1b686bac46b698b04c26585ce1e3d23def8ea 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -11,6 +11,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/callback_forward.h"
+#include "base/debug/task_annotator.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -426,10 +427,9 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// true if some work was done.
bool DeletePendingTasks();
- // Creates a process-wide unique ID to represent this task in trace events.
- // This will be mangled with a Process ID hash to reduce the likelyhood of
- // colliding with MessageLoop pointers on other processes.
- uint64 GetTaskTraceID(const PendingTask& task);
+ // Returns the TaskAnnotator which is used to add debug information to posted
+ // tasks.
+ debug::TaskAnnotator* task_annotator() { return &task_annotator_; }
eseidel 2014/08/12 16:18:49 Does Chromium use 'const' here?
Sami 2014/08/12 16:58:00 Making the method const would require a const_cast
// Loads tasks from the incoming queue to |work_queue_| if the latter is
// empty.
@@ -490,6 +490,8 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
ObserverList<TaskObserver> task_observers_;
+ debug::TaskAnnotator task_annotator_;
+
scoped_refptr<internal::IncomingTaskQueue> incoming_task_queue_;
// The message loop proxy associated with this message loop.
« no previous file with comments | « base/message_loop/incoming_task_queue.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698