summaryrefslogtreecommitdiffstats
path: root/remoting/base
diff options
context:
space:
mode:
authorepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 00:01:38 +0000
committerepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 00:01:38 +0000
commit54e6ff8ff7194e231fa5dfe49304574f189495ca (patch)
tree896f968b6eccc67a7c123b257a36bb7fa3fb918c /remoting/base
parent7fba3e550c138bf159589476c707a7e1d536055d (diff)
downloadchromium_src-54e6ff8ff7194e231fa5dfe49304574f189495ca.zip
chromium_src-54e6ff8ff7194e231fa5dfe49304574f189495ca.tar.gz
chromium_src-54e6ff8ff7194e231fa5dfe49304574f189495ca.tar.bz2
Reland: base: Support setting thread priorities generically.
This patch supports setting priorities across platforms at the PlatformThread level, by stashing thread id into the thread handle on linux/android. Since this adds more platform specific code, and #ifdefs were starting to get unwieldy, all platform specific code is moved into _platform.cc files, with the exception of the 'default' implementation, which stay in _posix. BUG=170549 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201202 Review URL: https://chromiumcodereview.appspot.com/12741012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base')
-rw-r--r--remoting/base/auto_thread.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc
index d79af49..9890bc3 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