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

Unified Diff: webrtc/voice_engine/monitor_module.cc

Issue 1607353002: Swap use of CriticalSectionWrapper with rtc::CriticalSection in voice_engine/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix bug in monitor_module.cc 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/monitor_module.h ('k') | webrtc/voice_engine/output_mixer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/monitor_module.cc
diff --git a/webrtc/voice_engine/monitor_module.cc b/webrtc/voice_engine/monitor_module.cc
index 5ea73571d87a2ac0499837a11addc7fa97ccab6a..2d8f4d46565e5997e177fac03d129eeaafcc8e51 100644
--- a/webrtc/voice_engine/monitor_module.cc
+++ b/webrtc/voice_engine/monitor_module.cc
@@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/tick_util.h"
#include "webrtc/voice_engine/monitor_module.h"
@@ -18,20 +17,18 @@ namespace voe {
MonitorModule::MonitorModule() :
_observerPtr(NULL),
- _callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_lastProcessTime(TickTime::MillisecondTimestamp())
{
}
MonitorModule::~MonitorModule()
{
- delete &_callbackCritSect;
}
int32_t
MonitorModule::RegisterObserver(MonitorObserver& observer)
{
- CriticalSectionScoped lock(&_callbackCritSect);
+ rtc::CritScope lock(&_callbackCritSect);
if (_observerPtr)
{
return -1;
@@ -43,7 +40,7 @@ MonitorModule::RegisterObserver(MonitorObserver& observer)
int32_t
MonitorModule::DeRegisterObserver()
{
- CriticalSectionScoped lock(&_callbackCritSect);
+ rtc::CritScope lock(&_callbackCritSect);
if (!_observerPtr)
{
return 0;
@@ -64,9 +61,9 @@ int32_t
MonitorModule::Process()
{
_lastProcessTime = TickTime::MillisecondTimestamp();
+ rtc::CritScope lock(&_callbackCritSect);
if (_observerPtr)
{
- CriticalSectionScoped lock(&_callbackCritSect);
_observerPtr->OnPeriodicProcess();
}
return 0;
« no previous file with comments | « webrtc/voice_engine/monitor_module.h ('k') | webrtc/voice_engine/output_mixer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698