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

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: rebase 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
« webrtc/voice_engine/shared_data.h ('K') | « 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 4bc5b3cf2b6140e636677b01e195d722a1cd3563..3e1e6b5daa5c142b198a1e13f7ed0a57098f5fb5 100644
--- a/webrtc/voice_engine/shared_data.cc
+++ b/webrtc/voice_engine/shared_data.cc
@@ -56,14 +56,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(
+ rtc::scoped_refptr<AudioDeviceModule> audio_device) {
+ _audioDevicePtr = audio_device;
}
void SharedData::set_audio_processing(AudioProcessing* audioproc) {
« webrtc/voice_engine/shared_data.h ('K') | « webrtc/voice_engine/shared_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698