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

Unified Diff: webrtc/voice_engine/voice_engine_impl.h

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.h
diff --git a/webrtc/voice_engine/voice_engine_impl.h b/webrtc/voice_engine/voice_engine_impl.h
index 07f29c37b9aa177323ea88d154d16673e32a204e..8921847e76cb42076b6ee76f2337947c84148dc7 100644
--- a/webrtc/voice_engine/voice_engine_impl.h
+++ b/webrtc/voice_engine/voice_engine_impl.h
@@ -11,8 +11,8 @@
#ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H
#define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H
+#include "webrtc/base/atomicops.h"
#include "webrtc/engine_configurations.h"
-#include "webrtc/system_wrappers/interface/atomic32.h"
#include "webrtc/voice_engine/voe_base_impl.h"
#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
@@ -121,7 +121,9 @@ class VoiceEngineImpl : public voe::SharedData, // Must be the first base class
_ref_count(0),
own_config_(owns_config ? config : NULL) {
}
- ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); }
+ ~VoiceEngineImpl() override {
+ assert(rtc::AtomicOps::AcquireLoad(&_ref_count) == 0);
+ }
int AddRef();
@@ -129,7 +131,7 @@ class VoiceEngineImpl : public voe::SharedData, // Must be the first base class
int Release() override;
private:
- Atomic32 _ref_count;
+ volatile int _ref_count;
rtc::scoped_ptr<const Config> own_config_;
};

Powered by Google App Engine
This is Rietveld 408576698