Index: base/profiler/stack_sampling_profiler.h |
diff --git a/base/profiler/stack_sampling_profiler.h b/base/profiler/stack_sampling_profiler.h |
index a5e30e9fa0e892c0c588be2ea1ce1f144d2c741c..da9b6465fa4eb62d55255c0059d93369e809a6db 100644 |
--- a/base/profiler/stack_sampling_profiler.h |
+++ b/base/profiler/stack_sampling_profiler.h |
@@ -215,13 +215,17 @@ class BASE_EXPORT StackSamplingProfiler { |
// are move-only. Other threads, including the UI thread, may block on |
// callback completion so this should run as quickly as possible. |
// |
+ // After collection completion, the callback may instruct the profiler to do |
+ // additional collection(s) by modifying the SamplingParams argument and |
+ // returning true to indicate collection should be started again. |
+ // |
// IMPORTANT NOTE: The callback is invoked on a thread the profiler |
// constructs, rather than on the thread used to construct the profiler and |
// set the callback, and thus the callback must be callable on any thread. For |
// threads with message loops that create StackSamplingProfilers, posting a |
// task to the message loop with the moved (i.e. std::move) profiles is the |
// thread-safe callback implementation. |
- using CompletedCallback = Callback<void(CallStackProfiles)>; |
+ using CompletedCallback = Callback<bool(CallStackProfiles, SamplingParams*)>; |
// Creates a profiler for the CURRENT thread that sends completed profiles |
// to |callback|. An optional |test_delegate| can be supplied by tests. |