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

Unified Diff: media/audio/audio_device_thread.cc

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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 | « no previous file | media/audio/audio_input_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_device_thread.cc
diff --git a/media/audio/audio_device_thread.cc b/media/audio/audio_device_thread.cc
index f68c0456bfa036318e5bc3298b7a0a487be305f1..6f92f676137a834f3f16b6de665753b584734984 100644
--- a/media/audio/audio_device_thread.cc
+++ b/media/audio/audio_device_thread.cc
@@ -64,22 +64,20 @@ class AudioDeviceThread::Thread
AudioDeviceThread::AudioDeviceThread() {
}
-AudioDeviceThread::~AudioDeviceThread() {
- DCHECK(!thread_);
-}
+AudioDeviceThread::~AudioDeviceThread() { DCHECK(!thread_.get()); }
void AudioDeviceThread::Start(AudioDeviceThread::Callback* callback,
base::SyncSocket::Handle socket,
const char* thread_name) {
base::AutoLock auto_lock(thread_lock_);
- CHECK(thread_ == NULL);
+ CHECK(thread_.get() == NULL);
thread_ = new AudioDeviceThread::Thread(callback, socket, thread_name);
thread_->Start();
}
void AudioDeviceThread::Stop(base::MessageLoop* loop_for_join) {
base::AutoLock auto_lock(thread_lock_);
- if (thread_) {
+ if (thread_.get()) {
thread_->Stop(loop_for_join);
thread_ = NULL;
}
@@ -87,7 +85,7 @@ void AudioDeviceThread::Stop(base::MessageLoop* loop_for_join) {
bool AudioDeviceThread::IsStopped() {
base::AutoLock auto_lock(thread_lock_);
- return thread_ == NULL;
+ return thread_.get() == NULL;
}
// AudioDeviceThread::Thread implementation
« no previous file with comments | « no previous file | media/audio/audio_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698