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

Unified Diff: content/renderer/media/webrtc_local_audio_track_unittest.cc

Issue 12741012: base: Support setting thread priorities generically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static initializers. 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 | « chrome_frame/chrome_frame_automation.h ('k') | media/audio/audio_device_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_local_audio_track_unittest.cc
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index 7e2f4732b508d5c17937ae7eb4cf3b2919ba8476..3d11faedbd173457066a1ca588cc9cb2a7fe4423 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -30,13 +30,13 @@ class FakeAudioThread : public base::PlatformThread::Delegate {
public:
explicit FakeAudioThread(const scoped_refptr<WebRtcAudioCapturer>& capturer)
: capturer_(capturer),
- thread_(base::kNullThreadHandle),
+ thread_(),
closure_(false, false) {
DCHECK(capturer);
audio_bus_ = media::AudioBus::Create(capturer_->audio_parameters());
}
- virtual ~FakeAudioThread() { DCHECK(!thread_); }
+ virtual ~FakeAudioThread() { DCHECK(thread_.is_null()); }
// base::PlatformThread::Delegate:
virtual void ThreadMain() OVERRIDE {
@@ -57,13 +57,13 @@ class FakeAudioThread : public base::PlatformThread::Delegate {
void Start() {
base::PlatformThread::CreateWithPriority(
0, this, &thread_, base::kThreadPriority_RealtimeAudio);
- CHECK(thread_ != base::kNullThreadHandle);
+ CHECK(!thread_.is_null());
}
void Stop() {
closure_.Signal();
base::PlatformThread::Join(thread_);
- thread_ = base::kNullThreadHandle;
+ thread_ = base::PlatformThreadHandle();
}
private:
« no previous file with comments | « chrome_frame/chrome_frame_automation.h ('k') | media/audio/audio_device_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698