Index: base/memory/weak_ptr_unittest.cc |
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc |
index 20e5c7b05c2d533b75eabc191054ad85669c2003..d89a5c6bbda66d9417d05ef94d68eb4a6128e31b 100644 |
--- a/base/memory/weak_ptr_unittest.cc |
+++ b/base/memory/weak_ptr_unittest.cc |
@@ -8,9 +8,8 @@ |
#include "base/bind.h" |
#include "base/debug/leak_annotations.h" |
-#include "base/location.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/single_thread_task_runner.h" |
+#include "base/message_loop/message_loop.h" |
#include "base/synchronization/waitable_event.h" |
#include "base/threading/thread.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -26,8 +25,9 @@ |
{ |
Thread creator_thread("creator_thread"); |
creator_thread.Start(); |
- creator_thread.task_runner()->PostTask( |
- FROM_HERE, base::Bind(OffThreadObjectCreator::CreateObject, &result)); |
+ creator_thread.message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(OffThreadObjectCreator::CreateObject, &result)); |
} |
DCHECK(result); // We synchronized on thread destruction above. |
return result; |
@@ -66,23 +66,25 @@ |
void CreateArrowFromTarget(Arrow** arrow, Target* target) { |
WaitableEvent completion(true, false); |
- task_runner()->PostTask( |
- FROM_HERE, base::Bind(&BackgroundThread::DoCreateArrowFromTarget, arrow, |
- target, &completion)); |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&BackgroundThread::DoCreateArrowFromTarget, |
+ arrow, target, &completion)); |
completion.Wait(); |
} |
void CreateArrowFromArrow(Arrow** arrow, const Arrow* other) { |
WaitableEvent completion(true, false); |
- task_runner()->PostTask( |
- FROM_HERE, base::Bind(&BackgroundThread::DoCreateArrowFromArrow, arrow, |
- other, &completion)); |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&BackgroundThread::DoCreateArrowFromArrow, |
+ arrow, other, &completion)); |
completion.Wait(); |
} |
void DeleteTarget(Target* object) { |
WaitableEvent completion(true, false); |
- task_runner()->PostTask( |
+ message_loop()->PostTask( |
FROM_HERE, |
base::Bind(&BackgroundThread::DoDeleteTarget, object, &completion)); |
completion.Wait(); |
@@ -90,23 +92,25 @@ |
void CopyAndAssignArrow(Arrow* object) { |
WaitableEvent completion(true, false); |
- task_runner()->PostTask( |
- FROM_HERE, base::Bind(&BackgroundThread::DoCopyAndAssignArrow, object, |
- &completion)); |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&BackgroundThread::DoCopyAndAssignArrow, |
+ object, &completion)); |
completion.Wait(); |
} |
void CopyAndAssignArrowBase(Arrow* object) { |
WaitableEvent completion(true, false); |
- task_runner()->PostTask( |
- FROM_HERE, base::Bind(&BackgroundThread::DoCopyAndAssignArrowBase, |
- object, &completion)); |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&BackgroundThread::DoCopyAndAssignArrowBase, |
+ object, &completion)); |
completion.Wait(); |
} |
void DeleteArrow(Arrow* object) { |
WaitableEvent completion(true, false); |
- task_runner()->PostTask( |
+ message_loop()->PostTask( |
FROM_HERE, |
base::Bind(&BackgroundThread::DoDeleteArrow, object, &completion)); |
completion.Wait(); |
@@ -115,8 +119,9 @@ |
Target* DeRef(const Arrow* arrow) { |
WaitableEvent completion(true, false); |
Target* result = NULL; |
- task_runner()->PostTask(FROM_HERE, base::Bind(&BackgroundThread::DoDeRef, |
- arrow, &result, &completion)); |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&BackgroundThread::DoDeRef, arrow, &result, &completion)); |
completion.Wait(); |
return result; |
} |