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

Unified Diff: webrtc/voice_engine/voice_engine_impl.cc

Issue 1347793005: Replace Atomic32 with webrtc/base/atomicops.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix typo Created 5 years, 3 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
Index: webrtc/voice_engine/voice_engine_impl.cc
diff --git a/webrtc/voice_engine/voice_engine_impl.cc b/webrtc/voice_engine/voice_engine_impl.cc
index f7f363debec0987bfa8423e14dc102a84c11cc47..bc8eca57c5422fd9a2ec96934669037bedd48a79 100644
--- a/webrtc/voice_engine/voice_engine_impl.cc
+++ b/webrtc/voice_engine/voice_engine_impl.cc
@@ -14,7 +14,7 @@
#include "webrtc/modules/audio_device/android/audio_track_jni.h"
#include "webrtc/modules/utility/interface/jvm_android.h"
#endif
-
+#include "webrtc/base/atomicops.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/system_wrappers/interface/trace.h"
#include "webrtc/voice_engine/voice_engine_impl.h"
@@ -54,12 +54,12 @@ VoiceEngine* GetVoiceEngine(const Config* config, bool owns_config) {
}
int VoiceEngineImpl::AddRef() {
- return ++_ref_count;
+ return rtc::AtomicOps::Increment(&_ref_count);
}
// This implements the Release() method for all the inherited interfaces.
int VoiceEngineImpl::Release() {
- int new_ref = --_ref_count;
+ int new_ref = rtc::AtomicOps::Decrement(&_ref_count);
assert(new_ref >= 0);
if (new_ref == 0) {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, -1,
« webrtc/system_wrappers/interface/atomic32.h ('K') | « webrtc/voice_engine/voice_engine_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698