summaryrefslogtreecommitdiffstats
path: root/base/message_loop_proxy_impl.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-11 00:50:59 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-11 00:50:59 +0000
commiteae9c0623d1800201739b4be146649103a45cd93 (patch)
tree2ce42f83e18d8a0a618ffd6dbe69b1acade5bda4 /base/message_loop_proxy_impl.cc
parent26f0821d0a34a79e551213d56054366aab6c70f7 (diff)
downloadchromium_src-eae9c0623d1800201739b4be146649103a45cd93.zip
chromium_src-eae9c0623d1800201739b4be146649103a45cd93.tar.gz
chromium_src-eae9c0623d1800201739b4be146649103a45cd93.tar.bz2
Order function definitions in base/ according to the header.
BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6085015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop_proxy_impl.cc')
-rw-r--r--base/message_loop_proxy_impl.cc56
1 files changed, 28 insertions, 28 deletions
diff --git a/base/message_loop_proxy_impl.cc b/base/message_loop_proxy_impl.cc
index 3b01fd6..b47c934 100644
--- a/base/message_loop_proxy_impl.cc
+++ b/base/message_loop_proxy_impl.cc
@@ -7,11 +7,6 @@
namespace base {
-MessageLoopProxyImpl::MessageLoopProxyImpl()
- : target_message_loop_(MessageLoop::current()) {
- target_message_loop_->AddDestructionObserver(this);
-}
-
MessageLoopProxyImpl::~MessageLoopProxyImpl() {
AutoLock lock(message_loop_lock_);
// If the target message loop still exists, the d'tor WILL execute on the
@@ -56,25 +51,10 @@ bool MessageLoopProxyImpl::BelongsToCurrentThread() {
(MessageLoop::current() == target_message_loop_));
}
-bool MessageLoopProxyImpl::PostTaskHelper(
- const tracked_objects::Location& from_here, Task* task, int64 delay_ms,
- bool nestable) {
- bool ret = false;
- {
- AutoLock lock(message_loop_lock_);
- if (target_message_loop_) {
- if (nestable) {
- target_message_loop_->PostDelayedTask(from_here, task, delay_ms);
- } else {
- target_message_loop_->PostNonNestableDelayedTask(from_here, task,
- delay_ms);
- }
- ret = true;
- }
- }
- if (!ret)
- delete task;
- return ret;
+// MessageLoop::DestructionObserver implementation
+void MessageLoopProxyImpl::WillDestroyCurrentMessageLoop() {
+ AutoLock lock(message_loop_lock_);
+ target_message_loop_ = NULL;
}
void MessageLoopProxyImpl::OnDestruct() const {
@@ -96,10 +76,30 @@ void MessageLoopProxyImpl::OnDestruct() const {
delete this;
}
-// MessageLoop::DestructionObserver implementation
-void MessageLoopProxyImpl::WillDestroyCurrentMessageLoop() {
- AutoLock lock(message_loop_lock_);
- target_message_loop_ = NULL;
+MessageLoopProxyImpl::MessageLoopProxyImpl()
+ : target_message_loop_(MessageLoop::current()) {
+ target_message_loop_->AddDestructionObserver(this);
+}
+
+bool MessageLoopProxyImpl::PostTaskHelper(
+ const tracked_objects::Location& from_here, Task* task, int64 delay_ms,
+ bool nestable) {
+ bool ret = false;
+ {
+ AutoLock lock(message_loop_lock_);
+ if (target_message_loop_) {
+ if (nestable) {
+ target_message_loop_->PostDelayedTask(from_here, task, delay_ms);
+ } else {
+ target_message_loop_->PostNonNestableDelayedTask(from_here, task,
+ delay_ms);
+ }
+ ret = true;
+ }
+ }
+ if (!ret)
+ delete task;
+ return ret;
}
scoped_refptr<MessageLoopProxy>