Index: base/test/thread_test_helper.cc |
diff --git a/chrome/test/thread_test_helper.cc b/base/test/thread_test_helper.cc |
similarity index 69% |
rename from chrome/test/thread_test_helper.cc |
rename to base/test/thread_test_helper.cc |
index 6714310b80323e9b8bf5fb3782724a79ff24c2f1..e79ca92698e092ac0d16e161ac7eb1f07d665d6b 100644 |
--- a/chrome/test/thread_test_helper.cc |
+++ b/base/test/thread_test_helper.cc |
@@ -2,16 +2,18 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/test/thread_test_helper.h" |
+#include "base/test/thread_test_helper.h" |
-ThreadTestHelper::ThreadTestHelper(BrowserThread::ID thread_id) |
+namespace base { |
+ |
+ThreadTestHelper::ThreadTestHelper(MessageLoopProxy* target_thread) |
: test_result_(false), |
- thread_id_(thread_id), |
+ target_thread_(target_thread), |
done_event_(false, false) { |
} |
bool ThreadTestHelper::Run() { |
- if (!BrowserThread::PostTask(thread_id_, FROM_HERE, NewRunnableMethod( |
+ if (!target_thread_->PostTask(FROM_HERE, NewRunnableMethod( |
this, &ThreadTestHelper::RunInThread))) { |
return false; |
} |
@@ -27,3 +29,5 @@ void ThreadTestHelper::RunInThread() { |
RunTest(); |
done_event_.Signal(); |
} |
+ |
+} // namespace base |