Chromium Code Reviews| Index: base/profiler/stack_sampling_profiler.h |
| diff --git a/base/profiler/stack_sampling_profiler.h b/base/profiler/stack_sampling_profiler.h |
| index 9aa9c31d67afd31a12113f5caeeb1b53e3ae771e..74ccccfc3b4d346a943fed31f1f74872ce77780a 100644 |
| --- a/base/profiler/stack_sampling_profiler.h |
| +++ b/base/profiler/stack_sampling_profiler.h |
| @@ -20,6 +20,7 @@ |
| namespace base { |
| class NativeStackSampler; |
| +class NativeStackSamplerTestDelegate; |
| // StackSamplingProfiler periodically stops a thread to sample its stack, for |
| // the purpose of collecting information about which code paths are |
| @@ -156,10 +157,15 @@ class BASE_EXPORT StackSamplingProfiler { |
| // thread-safe callback implementation. |
| using CompletedCallback = Callback<void(const CallStackProfiles&)>; |
| - // Creates a profiler that sends completed profiles to |callback|. |
| + // Creates a profiler that sends completed profiles to |callback|. The second |
| + // constructor is for test purposes. |
| StackSamplingProfiler(PlatformThreadId thread_id, |
| const SamplingParams& params, |
| const CompletedCallback& callback); |
| + StackSamplingProfiler(PlatformThreadId thread_id, |
| + const SamplingParams& params, |
| + const CompletedCallback& callback, |
| + NativeStackSamplerTestDelegate* test_delegate); |
| // Stops any profiling currently taking place before destroying the profiler. |
| ~StackSamplingProfiler(); |
| @@ -231,6 +237,8 @@ class BASE_EXPORT StackSamplingProfiler { |
| const CompletedCallback completed_callback_; |
| + NativeStackSamplerTestDelegate* const test_delegate_; |
| + |
|
cpu_(ooo_6.6-7.5)
2015/10/29 21:22:19
this looks strange here.
Mike Wittman
2015/10/29 23:23:28
It could be avoided by passing this in Start(). Bu
|
| DISALLOW_COPY_AND_ASSIGN(StackSamplingProfiler); |
| }; |