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

Side by Side Diff: content/renderer/devtools/v8_sampling_profiler.cc

Issue 2026253003: Migrate WaitableEvent to enum-based constructor in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 years, 6 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
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 #include "content/renderer/devtools/v8_sampling_profiler.h" 5 #include "content/renderer/devtools/v8_sampling_profiler.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 632 }
633 633
634 void V8SamplingProfiler::OnTraceLogDisabled() { 634 void V8SamplingProfiler::OnTraceLogDisabled() {
635 StopSamplingThread(); 635 StopSamplingThread();
636 } 636 }
637 637
638 void V8SamplingProfiler::EnableSamplingEventForTesting(int code_added_events, 638 void V8SamplingProfiler::EnableSamplingEventForTesting(int code_added_events,
639 int sample_events) { 639 int sample_events) {
640 render_thread_sampler_->SetEventsToCollectForTest(code_added_events, 640 render_thread_sampler_->SetEventsToCollectForTest(code_added_events,
641 sample_events); 641 sample_events);
642 waitable_event_for_testing_.reset(new base::WaitableEvent(false, false)); 642 waitable_event_for_testing_.reset(
643 new base::WaitableEvent(base::WaitableEvent::ResetPolicy::AUTOMATIC,
644 base::WaitableEvent::InitialState::NOT_SIGNALED));
643 } 645 }
644 646
645 void V8SamplingProfiler::WaitSamplingEventForTesting() { 647 void V8SamplingProfiler::WaitSamplingEventForTesting() {
646 waitable_event_for_testing_->Wait(); 648 waitable_event_for_testing_->Wait();
647 } 649 }
648 650
649 } // namespace content 651 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | content/renderer/devtools/v8_sampling_profiler_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698