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

Unified Diff: mojo/edk/embedder/embedder_unittest.cc

Issue 728613002: Make the embedder API use the ChannelManager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update comment Created 6 years, 1 month 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 | « mojo/edk/embedder/embedder_internal.h ('k') | mojo/edk/embedder/test_embedder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder_unittest.cc
diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc
index 78423d2c5b69ccac1d241eb6f6291a935e3a89ce..16a5ce2021e2f987b91414e4f7309cab9691f0e3 100644
--- a/mojo/edk/embedder/embedder_unittest.cc
+++ b/mojo/edk/embedder/embedder_unittest.cc
@@ -50,11 +50,7 @@ class ScopedTestChannel {
// Destructor: Shuts down the channel. (As noted above, for this to happen,
// the I/O thread must be alive and pumping messages.)
- ~ScopedTestChannel() {
- system::test::PostTaskAndWait(
- io_thread_task_runner_, FROM_HERE,
- base::Bind(&ScopedTestChannel::DestroyChannel, base::Unretained(this)));
- }
+ ~ScopedTestChannel() { DestroyChannel(channel_info_); }
// Waits for channel creation to be completed.
void WaitForChannelCreationCompletion() { did_create_channel_event_.Wait(); }
@@ -73,12 +69,6 @@ class ScopedTestChannel {
did_create_channel_event_.Signal();
}
- void DestroyChannel() {
- CHECK(channel_info_);
- DestroyChannelOnIOThread(channel_info_);
- channel_info_ = nullptr;
- }
-
scoped_refptr<base::TaskRunner> io_thread_task_runner_;
// Valid from creation until whenever it gets closed (by the "owner" of this
« no previous file with comments | « mojo/edk/embedder/embedder_internal.h ('k') | mojo/edk/embedder/test_embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698