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

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

Issue 1613643004: Remove mutable from rtc::CriticalSection members. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 int RenderMinusCaptureCounters() const { 291 int RenderMinusCaptureCounters() const {
292 return -CaptureMinusRenderCounters(); 292 return -CaptureMinusRenderCounters();
293 } 293 }
294 294
295 bool BothCountersExceedeThreshold(int threshold) { 295 bool BothCountersExceedeThreshold(int threshold) {
296 rtc::CritScope cs(&crit_); 296 rtc::CritScope cs(&crit_);
297 return (render_count > threshold && capture_count > threshold); 297 return (render_count > threshold && capture_count > threshold);
298 } 298 }
299 299
300 private: 300 private:
301 mutable rtc::CriticalSection crit_; 301 rtc::CriticalSection crit_;
302 int render_count GUARDED_BY(crit_) = 0; 302 int render_count GUARDED_BY(crit_) = 0;
303 int capture_count GUARDED_BY(crit_) = 0; 303 int capture_count GUARDED_BY(crit_) = 0;
304 }; 304 };
305 305
306 // Class for handling the capture side processing. 306 // Class for handling the capture side processing.
307 class CaptureProcessor { 307 class CaptureProcessor {
308 public: 308 public:
309 CaptureProcessor(int max_frame_size, 309 CaptureProcessor(int max_frame_size,
310 RandomGenerator* rand_gen, 310 RandomGenerator* rand_gen,
311 rtc::Event* render_call_event, 311 rtc::Event* render_call_event,
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 DISABLED_AudioProcessingImplLockExtensive, 1124 DISABLED_AudioProcessingImplLockExtensive,
1125 AudioProcessingImplLockTest, 1125 AudioProcessingImplLockTest,
1126 ::testing::ValuesIn(TestConfig::GenerateExtensiveTestConfigs())); 1126 ::testing::ValuesIn(TestConfig::GenerateExtensiveTestConfigs()));
1127 1127
1128 INSTANTIATE_TEST_CASE_P( 1128 INSTANTIATE_TEST_CASE_P(
1129 AudioProcessingImplLockBrief, 1129 AudioProcessingImplLockBrief,
1130 AudioProcessingImplLockTest, 1130 AudioProcessingImplLockTest,
1131 ::testing::ValuesIn(TestConfig::GenerateBriefTestConfigs())); 1131 ::testing::ValuesIn(TestConfig::GenerateBriefTestConfigs()));
1132 1132
1133 } // namespace webrtc 1133 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698