summaryrefslogtreecommitdiffstats
path: root/base/threading
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 20:33:46 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 20:33:46 +0000
commitedd685f15dfd2841aaeddab567aea0623db1ae69 (patch)
tree9caa53e84eb2787471dd16009daf02fb85f8890e /base/threading
parent5b79e5250785613d6dc7a42a27a45bb44b9cf7a0 (diff)
downloadchromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.zip
chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.gz
chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.bz2
Add MessageLoopProxy::current
Review URL: http://codereview.chromium.org/7583053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/threading')
-rw-r--r--base/threading/thread.cc4
-rw-r--r--base/threading/thread.h6
2 files changed, 2 insertions, 8 deletions
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 7a100ca..616aac8 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -151,7 +151,6 @@ void Thread::ThreadMain() {
ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector.
message_loop.set_thread_name(name_);
message_loop_ = &message_loop;
- message_loop_proxy_ = MessageLoopProxy::CreateForCurrentThread();
// Let the thread do extra initialization.
// Let's do this before signaling we are started.
@@ -171,7 +170,6 @@ void Thread::ThreadMain() {
// We can't receive messages anymore.
message_loop_ = NULL;
- message_loop_proxy_ = NULL;
}
thread_id_ = kInvalidThreadId;
}
diff --git a/base/threading/thread.h b/base/threading/thread.h
index 58a4cc2..d7451ec 100644
--- a/base/threading/thread.h
+++ b/base/threading/thread.h
@@ -113,7 +113,7 @@ class BASE_EXPORT Thread : PlatformThread::Delegate {
// is gone.
// TODO(sanjeevr): Look into merging MessageLoop and MessageLoopProxy.
scoped_refptr<MessageLoopProxy> message_loop_proxy() const {
- return message_loop_proxy_;
+ return message_loop_->message_loop_proxy();
}
// Set the name of this thread (for display in debugger too).
@@ -175,10 +175,6 @@ class BASE_EXPORT Thread : PlatformThread::Delegate {
// by the created thread.
MessageLoop* message_loop_;
- // A MessageLoopProxy implementation that targets this thread. This can
- // outlive the thread.
- scoped_refptr<MessageLoopProxy> message_loop_proxy_;
-
// Our thread's ID.
PlatformThreadId thread_id_;