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

Unified Diff: remoting/base/auto_thread.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 | « media/filters/video_renderer_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/auto_thread.cc
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc
index d79af49faa6976fdd14eb4bbb903e6176af5cc6e..9890bc39ecaaa8bff1981880218a55de2337e70b 100644
--- a/remoting/base/auto_thread.cc
+++ b/remoting/base/auto_thread.cc
@@ -92,7 +92,7 @@ AutoThread::AutoThread(const char* name)
#if defined(OS_WIN)
com_init_type_(COM_INIT_NONE),
#endif
- thread_(0),
+ thread_(),
name_(name),
was_quit_properly_(false) {
}
@@ -102,7 +102,7 @@ AutoThread::AutoThread(const char* name, AutoThreadTaskRunner* joiner)
#if defined(OS_WIN)
com_init_type_(COM_INIT_NONE),
#endif
- thread_(0),
+ thread_(),
name_(name),
was_quit_properly_(false),
joiner_(joiner) {
@@ -112,14 +112,14 @@ AutoThread::~AutoThread() {
DCHECK(!startup_data_);
// Wait for the thread to exit.
- if (thread_) {
+ if (!thread_.is_null()) {
base::PlatformThread::Join(thread_);
}
}
scoped_refptr<AutoThreadTaskRunner> AutoThread::StartWithType(
base::MessageLoop::Type type) {
- DCHECK(!thread_);
+ DCHECK(thread_.is_null());
#if defined(OS_WIN)
DCHECK(com_init_type_ != COM_INIT_STA || type == base::MessageLoop::TYPE_UI);
#endif
« no previous file with comments | « media/filters/video_renderer_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698