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

Side by Side Diff: media/audio/audio_device_thread.cc

Issue 1051863003: Turn ThreadPriority enum into an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setthreadpri
Patch Set: nits Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/audio_device_thread.h" 5 #include "media/audio/audio_device_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 DCHECK(thread_.is_null()); 108 DCHECK(thread_.is_null());
109 } 109 }
110 110
111 void AudioDeviceThread::Thread::Start() { 111 void AudioDeviceThread::Thread::Start() {
112 base::AutoLock auto_lock(callback_lock_); 112 base::AutoLock auto_lock(callback_lock_);
113 DCHECK(thread_.is_null()); 113 DCHECK(thread_.is_null());
114 // This reference will be released when the thread exists. 114 // This reference will be released when the thread exists.
115 AddRef(); 115 AddRef();
116 116
117 PlatformThread::CreateWithPriority(0, this, &thread_, 117 PlatformThread::CreateWithPriority(0, this, &thread_,
118 base::kThreadPriority_RealtimeAudio); 118 base::ThreadPriority::REALTIME_AUDIO);
119 CHECK(!thread_.is_null()); 119 CHECK(!thread_.is_null());
120 } 120 }
121 121
122 void AudioDeviceThread::Thread::Stop(base::MessageLoop* loop_for_join) { 122 void AudioDeviceThread::Thread::Stop(base::MessageLoop* loop_for_join) {
123 socket_.Shutdown(); 123 socket_.Shutdown();
124 124
125 base::PlatformThreadHandle thread = base::PlatformThreadHandle(); 125 base::PlatformThreadHandle thread = base::PlatformThreadHandle();
126 126
127 { // NOLINT 127 { // NOLINT
128 base::AutoLock auto_lock(callback_lock_); 128 base::AutoLock auto_lock(callback_lock_);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 AudioDeviceThread::Callback::~Callback() {} 220 AudioDeviceThread::Callback::~Callback() {}
221 221
222 void AudioDeviceThread::Callback::InitializeOnAudioThread() { 222 void AudioDeviceThread::Callback::InitializeOnAudioThread() {
223 MapSharedMemory(); 223 MapSharedMemory();
224 CHECK(shared_memory_.memory()); 224 CHECK(shared_memory_.memory());
225 } 225 }
226 226
227 } // namespace media. 227 } // namespace media.
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc ('k') | media/audio/win/audio_low_latency_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698