Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3072)

Unified Diff: base/test/test_io_thread.cc

Issue 2170953002: Fix MemoryDumpManagerTest's thread unsafe usage of the base::TestIOThread API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a0_a_0_thread_cleanup
Patch Set: Keep re-enabling base::Thread::Stop() checks for follow-up CL. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/test_io_thread.h ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_io_thread.cc
diff --git a/base/test/test_io_thread.cc b/base/test/test_io_thread.cc
index 1fa041251cbd9ed16b5b723f93954e07d4c8785a..ce4a8d10de27c74fdd9942c51c6c08811b2568ef 100644
--- a/base/test/test_io_thread.cc
+++ b/base/test/test_io_thread.cc
@@ -4,19 +4,7 @@
#include "base/test/test_io_thread.h"
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/synchronization/waitable_event.h"
-
-namespace {
-
-void PostTaskAndWaitHelper(base::WaitableEvent* event,
- const base::Closure& task) {
- task.Run();
- event->Signal();
-}
-
-} // namespace
+#include "base/logging.h"
namespace base {
@@ -54,13 +42,4 @@ void TestIOThread::PostTask(const tracked_objects::Location& from_here,
task_runner()->PostTask(from_here, task);
}
-void TestIOThread::PostTaskAndWait(const tracked_objects::Location& from_here,
- const base::Closure& task) {
- base::WaitableEvent event(WaitableEvent::ResetPolicy::AUTOMATIC,
- WaitableEvent::InitialState::NOT_SIGNALED);
- task_runner()->PostTask(from_here,
- base::Bind(&PostTaskAndWaitHelper, &event, task));
- event.Wait();
-}
-
} // namespace base
« no previous file with comments | « base/test/test_io_thread.h ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698