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

Unified Diff: mojo/edk/system/core_test_base.cc

Issue 1946423002: EDK: Remove Core::AddDispatcher(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « mojo/edk/system/core.cc ('k') | mojo/edk/system/data_pipe_consumer_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core_test_base.cc
diff --git a/mojo/edk/system/core_test_base.cc b/mojo/edk/system/core_test_base.cc
index 2ea2da3a2a0144bc3aa5ba4dcfe47bc5570ca6e5..6297456a0c1d2e8f74ab79628e084b69b03de448 100644
--- a/mojo/edk/system/core_test_base.cc
+++ b/mojo/edk/system/core_test_base.cc
@@ -4,6 +4,7 @@
#include "mojo/edk/system/core_test_base.h"
+#include <utility>
#include <vector>
#include "base/logging.h"
@@ -11,6 +12,7 @@
#include "mojo/edk/system/configuration.h"
#include "mojo/edk/system/core.h"
#include "mojo/edk/system/dispatcher.h"
+#include "mojo/edk/system/handle.h"
#include "mojo/edk/system/memory.h"
#include "mojo/edk/util/ref_ptr.h"
#include "mojo/public/cpp/system/macros.h"
@@ -224,7 +226,11 @@ void CoreTestBase::TearDown() {
MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) {
CHECK(core_);
auto dispatcher = MockDispatcher::Create(info);
- MojoHandle rv = core_->AddDispatcher(dispatcher.get());
+ MojoHandle rv = core_->AddHandle(
+ Handle(std::move(dispatcher),
+ MOJO_HANDLE_RIGHT_DUPLICATE | MOJO_HANDLE_RIGHT_TRANSFER |
+ MOJO_HANDLE_RIGHT_READ | MOJO_HANDLE_RIGHT_WRITE |
+ MOJO_HANDLE_RIGHT_EXECUTE));
CHECK_NE(rv, MOJO_HANDLE_INVALID);
return rv;
}
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/data_pipe_consumer_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698