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

Side by Side Diff: base/debug/task_annotator.h

Issue 2386653002: Replace base::Callback with base::OnceCallback in base::PendingTask (Closed)
Patch Set: move UnsafeConvertOnceClosureToRepeating Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/debug/task_annotator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_DEBUG_TASK_ANNOTATOR_H_ 5 #ifndef BASE_DEBUG_TASK_ANNOTATOR_H_
6 #define BASE_DEBUG_TASK_ANNOTATOR_H_ 6 #define BASE_DEBUG_TASK_ANNOTATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 10 matching lines...) Expand all
21 TaskAnnotator(); 21 TaskAnnotator();
22 ~TaskAnnotator(); 22 ~TaskAnnotator();
23 23
24 // Called to indicate that a task has been queued to run in the future. 24 // Called to indicate that a task has been queued to run in the future.
25 // |queue_function| is used as the trace flow event name. 25 // |queue_function| is used as the trace flow event name.
26 void DidQueueTask(const char* queue_function, 26 void DidQueueTask(const char* queue_function,
27 const PendingTask& pending_task); 27 const PendingTask& pending_task);
28 28
29 // Run a previously queued task. |queue_function| should match what was 29 // Run a previously queued task. |queue_function| should match what was
30 // passed into |DidQueueTask| for this task. 30 // passed into |DidQueueTask| for this task.
31 void RunTask(const char* queue_function, const PendingTask& pending_task); 31 void RunTask(const char* queue_function, PendingTask* pending_task);
32 32
33 private: 33 private:
34 // Creates a process-wide unique ID to represent this task in trace events. 34 // Creates a process-wide unique ID to represent this task in trace events.
35 // This will be mangled with a Process ID hash to reduce the likelyhood of 35 // This will be mangled with a Process ID hash to reduce the likelyhood of
36 // colliding with TaskAnnotator pointers on other processes. 36 // colliding with TaskAnnotator pointers on other processes.
37 uint64_t GetTaskTraceID(const PendingTask& task) const; 37 uint64_t GetTaskTraceID(const PendingTask& task) const;
38 38
39 DISALLOW_COPY_AND_ASSIGN(TaskAnnotator); 39 DISALLOW_COPY_AND_ASSIGN(TaskAnnotator);
40 }; 40 };
41 41
42 } // namespace debug 42 } // namespace debug
43 } // namespace base 43 } // namespace base
44 44
45 #endif // BASE_DEBUG_TASK_ANNOTATOR_H_ 45 #endif // BASE_DEBUG_TASK_ANNOTATOR_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/task_annotator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698