OLD | NEW |
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 #include "content/renderer/devtools/v8_sampling_profiler.h" | 5 #include "content/renderer/devtools/v8_sampling_profiler.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | |
8 #include "base/synchronization/cancellation_flag.h" | 7 #include "base/synchronization/cancellation_flag.h" |
9 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
| 9 #include "base/trace_event/trace_event.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 class V8SamplingThread : public base::PlatformThread::Delegate { | 13 class V8SamplingThread : public base::PlatformThread::Delegate { |
14 public: | 14 public: |
15 explicit V8SamplingThread(base::WaitableEvent* event); | 15 explicit V8SamplingThread(base::WaitableEvent* event); |
16 | 16 |
17 // Implementation of PlatformThread::Delegate: | 17 // Implementation of PlatformThread::Delegate: |
18 void ThreadMain() override; | 18 void ThreadMain() override; |
19 | 19 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 void V8SamplingProfiler::EnableSamplingEventForTesting() { | 89 void V8SamplingProfiler::EnableSamplingEventForTesting() { |
90 waitable_event_for_testing_.reset(new base::WaitableEvent(false, false)); | 90 waitable_event_for_testing_.reset(new base::WaitableEvent(false, false)); |
91 } | 91 } |
92 | 92 |
93 void V8SamplingProfiler::WaitSamplingEventForTesting() { | 93 void V8SamplingProfiler::WaitSamplingEventForTesting() { |
94 waitable_event_for_testing_->Wait(); | 94 waitable_event_for_testing_->Wait(); |
95 } | 95 } |
96 | 96 |
97 } // namespace blink | 97 } // namespace blink |
OLD | NEW |