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

Unified Diff: webrtc/voice_engine/shared_data.cc

Issue 1477013005: Replace RefCountImpl with rtc::RefCountedObject. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add back explicit Release()s in test Created 4 years, 9 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/shared_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/shared_data.cc
diff --git a/webrtc/voice_engine/shared_data.cc b/webrtc/voice_engine/shared_data.cc
index b21578c927bdef21205f356ec0adc9fc6832c5d9..997f51b43961f9f5d47945c82ac0f354a22b9c63 100644
--- a/webrtc/voice_engine/shared_data.cc
+++ b/webrtc/voice_engine/shared_data.cc
@@ -54,14 +54,9 @@ SharedData::~SharedData()
Trace::ReturnTrace();
}
-void SharedData::set_audio_device(AudioDeviceModule* audio_device)
-{
- // AddRef first in case the pointers are equal.
- if (audio_device)
- audio_device->AddRef();
- if (_audioDevicePtr)
- _audioDevicePtr->Release();
- _audioDevicePtr = audio_device;
+void SharedData::set_audio_device(
+ const rtc::scoped_refptr<AudioDeviceModule>& audio_device) {
+ _audioDevicePtr = audio_device;
}
void SharedData::set_audio_processing(AudioProcessing* audioproc) {
« no previous file with comments | « webrtc/voice_engine/shared_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698