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

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

Issue 2084593005: Rationalize AddAwakable...() and RemoveAwakable...() methods. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 6 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_test_base.h ('k') | mojo/edk/system/data_pipe.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 f56f3fd66803cb409081fba129204ba051fca951..30ae304347f913796aed8edd4d17fa77f28fa181 100644
--- a/mojo/edk/system/core_test_base.cc
+++ b/mojo/edk/system/core_test_base.cc
@@ -171,9 +171,9 @@ class MockDispatcher : public Dispatcher {
}
MojoResult AddAwakableImplNoLock(Awakable* awakable,
- MojoHandleSignals /*signals*/,
- bool /*force*/,
uint64_t /*context*/,
+ bool /*force*/,
+ MojoHandleSignals /*signals*/,
HandleSignalsState* signals_state) override {
info_->IncrementAddAwakableCallCount();
mutex().AssertHeld();
@@ -187,7 +187,9 @@ class MockDispatcher : public Dispatcher {
return MOJO_RESULT_FAILED_PRECONDITION;
}
- void RemoveAwakableImplNoLock(Awakable* /*awakable*/,
+ void RemoveAwakableImplNoLock(bool /*match_context*/,
+ Awakable* /*awakable*/,
+ uint64_t /*context*/,
HandleSignalsState* signals_state) override {
info_->IncrementRemoveAwakableCallCount();
mutex().AssertHeld();
@@ -195,16 +197,6 @@ class MockDispatcher : public Dispatcher {
*signals_state = HandleSignalsState();
}
- void RemoveAwakableWithContextImplNoLock(
- Awakable* /*awakable*/,
- uint64_t /*context*/,
- HandleSignalsState* signals_state) override {
- info_->IncrementRemoveAwakableWithContextCallCount();
- mutex().AssertHeld();
- if (signals_state)
- *signals_state = HandleSignalsState();
- }
-
void CancelAllStateNoLock() override {
info_->IncrementCancelAllStateCallCount();
mutex().AssertHeld();
@@ -350,12 +342,6 @@ unsigned CoreTestBase_MockHandleInfo::GetRemoveAwakableCallCount() const {
return remove_awakable_call_count_;
}
-unsigned CoreTestBase_MockHandleInfo::GetRemoveAwakableWithContextCallCount()
- const {
- MutexLocker locker(&mutex_);
- return remove_awakable_with_context_call_count_;
-}
-
unsigned CoreTestBase_MockHandleInfo::GetCancelAllStateCallCount() const {
MutexLocker locker(&mutex_);
return cancel_all_awakables_call_count_;
@@ -456,12 +442,6 @@ void CoreTestBase_MockHandleInfo::IncrementRemoveAwakableCallCount() {
remove_awakable_call_count_++;
}
-void CoreTestBase_MockHandleInfo::
- IncrementRemoveAwakableWithContextCallCount() {
- MutexLocker locker(&mutex_);
- remove_awakable_with_context_call_count_++;
-}
-
void CoreTestBase_MockHandleInfo::IncrementCancelAllStateCallCount() {
MutexLocker locker(&mutex_);
cancel_all_awakables_call_count_++;
« no previous file with comments | « mojo/edk/system/core_test_base.h ('k') | mojo/edk/system/data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698