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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc

Issue 1710483002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 10 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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/audio_processing/audio_processing_impl.h" 11 #include "webrtc/modules/audio_processing/audio_processing_impl.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <memory>
14 #include <vector> 15 #include <vector>
15 16
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 #include "webrtc/base/array_view.h" 18 #include "webrtc/base/array_view.h"
18 #include "webrtc/base/criticalsection.h" 19 #include "webrtc/base/criticalsection.h"
19 #include "webrtc/base/event.h" 20 #include "webrtc/base/event.h"
20 #include "webrtc/base/platform_thread.h" 21 #include "webrtc/base/platform_thread.h"
21 #include "webrtc/base/random.h" 22 #include "webrtc/base/random.h"
22 #include "webrtc/config.h" 23 #include "webrtc/config.h"
23 #include "webrtc/modules/audio_processing/test/test_utils.h" 24 #include "webrtc/modules/audio_processing/test/test_utils.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 rtc::Event test_complete_; 441 rtc::Event test_complete_;
441 rtc::Event render_call_event_; 442 rtc::Event render_call_event_;
442 rtc::Event capture_call_event_; 443 rtc::Event capture_call_event_;
443 444
444 // Thread related variables. 445 // Thread related variables.
445 rtc::PlatformThread render_thread_; 446 rtc::PlatformThread render_thread_;
446 rtc::PlatformThread capture_thread_; 447 rtc::PlatformThread capture_thread_;
447 rtc::PlatformThread stats_thread_; 448 rtc::PlatformThread stats_thread_;
448 mutable RandomGenerator rand_gen_; 449 mutable RandomGenerator rand_gen_;
449 450
450 rtc::scoped_ptr<AudioProcessing> apm_; 451 std::unique_ptr<AudioProcessing> apm_;
451 TestConfig test_config_; 452 TestConfig test_config_;
452 FrameCounters frame_counters_; 453 FrameCounters frame_counters_;
453 RenderProcessor render_thread_state_; 454 RenderProcessor render_thread_state_;
454 CaptureProcessor capture_thread_state_; 455 CaptureProcessor capture_thread_state_;
455 StatsProcessor stats_thread_state_; 456 StatsProcessor stats_thread_state_;
456 }; 457 };
457 458
458 // Sleeps a random time between 0 and max_sleep milliseconds. 459 // Sleeps a random time between 0 and max_sleep milliseconds.
459 void SleepRandomMs(int max_sleep, RandomGenerator* rand_gen) { 460 void SleepRandomMs(int max_sleep, RandomGenerator* rand_gen) {
460 int sleeptime = rand_gen->RandInt(0, max_sleep); 461 int sleeptime = rand_gen->RandInt(0, max_sleep);
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 DISABLED_AudioProcessingImplLockExtensive, 1134 DISABLED_AudioProcessingImplLockExtensive,
1134 AudioProcessingImplLockTest, 1135 AudioProcessingImplLockTest,
1135 ::testing::ValuesIn(TestConfig::GenerateExtensiveTestConfigs())); 1136 ::testing::ValuesIn(TestConfig::GenerateExtensiveTestConfigs()));
1136 1137
1137 INSTANTIATE_TEST_CASE_P( 1138 INSTANTIATE_TEST_CASE_P(
1138 AudioProcessingImplLockBrief, 1139 AudioProcessingImplLockBrief,
1139 AudioProcessingImplLockTest, 1140 AudioProcessingImplLockTest,
1140 ::testing::ValuesIn(TestConfig::GenerateBriefTestConfigs())); 1141 ::testing::ValuesIn(TestConfig::GenerateBriefTestConfigs()));
1141 1142
1142 } // namespace webrtc 1143 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698