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

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

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| Created 6 years 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
Index: mojo/edk/system/local_message_pipe_endpoint.cc
diff --git a/mojo/edk/system/local_message_pipe_endpoint.cc b/mojo/edk/system/local_message_pipe_endpoint.cc
index 86d241c93171a896fd7fd43980818bd82368b704..576ad505016b7e7c197e71da58ec628d76d4c141 100644
--- a/mojo/edk/system/local_message_pipe_endpoint.cc
+++ b/mojo/edk/system/local_message_pipe_endpoint.cc
@@ -35,7 +35,7 @@ bool LocalMessagePipeEndpoint::OnPeerClose() {
HandleSignalsState new_state = GetHandleSignalsState();
if (!new_state.equals(old_state))
- waiter_list_.AwakeWaitersForStateChange(new_state);
+ awakable_list_.AwakeForStateChange(new_state);
return true;
}
@@ -48,7 +48,7 @@ void LocalMessagePipeEndpoint::EnqueueMessage(
bool was_empty = message_queue_.IsEmpty();
message_queue_.AddMessage(message.Pass());
if (was_empty)
- waiter_list_.AwakeWaitersForStateChange(GetHandleSignalsState());
+ awakable_list_.AwakeForStateChange(GetHandleSignalsState());
}
void LocalMessagePipeEndpoint::Close() {
@@ -57,9 +57,9 @@ void LocalMessagePipeEndpoint::Close() {
message_queue_.Clear();
}
-void LocalMessagePipeEndpoint::CancelAllWaiters() {
+void LocalMessagePipeEndpoint::CancelAllAwakables() {
DCHECK(is_open_);
- waiter_list_.CancelAllWaiters();
+ awakable_list_.CancelAll();
}
MojoResult LocalMessagePipeEndpoint::ReadMessage(
@@ -117,7 +117,7 @@ MojoResult LocalMessagePipeEndpoint::ReadMessage(
if (message_queue_.IsEmpty()) {
// It's currently not possible to wait for non-readability, but we should
// do the state change anyway.
- waiter_list_.AwakeWaitersForStateChange(GetHandleSignalsState());
+ awakable_list_.AwakeForStateChange(GetHandleSignalsState());
}
}
@@ -144,8 +144,8 @@ HandleSignalsState LocalMessagePipeEndpoint::GetHandleSignalsState() const {
return rv;
}
-MojoResult LocalMessagePipeEndpoint::AddWaiter(
- Waiter* waiter,
+MojoResult LocalMessagePipeEndpoint::AddAwakable(
+ Awakable* awakable,
MojoHandleSignals signals,
uint32_t context,
HandleSignalsState* signals_state) {
@@ -163,14 +163,15 @@ MojoResult LocalMessagePipeEndpoint::AddWaiter(
return MOJO_RESULT_FAILED_PRECONDITION;
}
- waiter_list_.AddWaiter(waiter, signals, context);
+ awakable_list_.Add(awakable, signals, context);
return MOJO_RESULT_OK;
}
-void LocalMessagePipeEndpoint::RemoveWaiter(Waiter* waiter,
- HandleSignalsState* signals_state) {
+void LocalMessagePipeEndpoint::RemoveAwakable(
+ Awakable* awakable,
+ HandleSignalsState* signals_state) {
DCHECK(is_open_);
- waiter_list_.RemoveWaiter(waiter);
+ awakable_list_.Remove(awakable);
if (signals_state)
*signals_state = GetHandleSignalsState();
}

Powered by Google App Engine
This is Rietveld 408576698