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

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

Issue 724493002: Re-run clang-format on mojo/edk/{embedder,system,test}. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/system/channel_unittest.cc ('k') | mojo/edk/system/core_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index caced83920767b585c8b017176ce439e4de8d2b3..27d33b26db94a85b32993de05d751b055764b65b 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -126,11 +126,7 @@ MojoResult Core::Wait(MojoHandle handle,
UserPointer<MojoHandleSignalsState> signals_state) {
uint32_t unused = static_cast<uint32_t>(-1);
HandleSignalsState hss;
- MojoResult rv = WaitManyInternal(&handle,
- &signals,
- 1,
- deadline,
- &unused,
+ MojoResult rv = WaitManyInternal(&handle, &signals, 1, deadline, &unused,
signals_state.IsNull() ? nullptr : &hss);
if (rv != MOJO_RESULT_INVALID_ARGUMENT && !signals_state.IsNull())
signals_state.Put(hss);
@@ -155,23 +151,17 @@ MojoResult Core::WaitMany(UserPointer<const MojoHandle> handles,
MojoResult rv;
if (signals_states.IsNull()) {
rv = WaitManyInternal(handles_reader.GetPointer(),
- signals_reader.GetPointer(),
- num_handles,
- deadline,
- &index,
- nullptr);
+ signals_reader.GetPointer(), num_handles, deadline,
+ &index, nullptr);
} else {
UserPointer<MojoHandleSignalsState>::Writer signals_states_writer(
signals_states, num_handles);
// Note: The |reinterpret_cast| is safe, since |HandleSignalsState| is a
// subclass of |MojoHandleSignalsState| that doesn't add any data members.
rv = WaitManyInternal(handles_reader.GetPointer(),
- signals_reader.GetPointer(),
- num_handles,
- deadline,
- &index,
- reinterpret_cast<HandleSignalsState*>(
- signals_states_writer.GetPointer()));
+ signals_reader.GetPointer(), num_handles, deadline,
+ &index, reinterpret_cast<HandleSignalsState*>(
+ signals_states_writer.GetPointer()));
if (rv != MOJO_RESULT_INVALID_ARGUMENT)
signals_states_writer.Commit();
}
@@ -263,11 +253,9 @@ MojoResult Core::WriteMessage(MojoHandle message_pipe_handle,
// handles from the handle table.
{
base::AutoLock locker(handle_table_lock_);
- MojoResult result =
- handle_table_.MarkBusyAndStartTransport(message_pipe_handle,
- handles_reader.GetPointer(),
- num_handles,
- &transports);
+ MojoResult result = handle_table_.MarkBusyAndStartTransport(
+ message_pipe_handle, handles_reader.GetPointer(), num_handles,
+ &transports);
if (result != MOJO_RESULT_OK)
return result;
}
@@ -308,12 +296,12 @@ MojoResult Core::ReadMessage(MojoHandle message_pipe_handle,
MojoResult rv;
if (num_handles_value == 0) {
// Easy case: won't receive any handles.
- rv = dispatcher->ReadMessage(
- bytes, num_bytes, nullptr, &num_handles_value, flags);
+ rv = dispatcher->ReadMessage(bytes, num_bytes, nullptr, &num_handles_value,
+ flags);
} else {
DispatcherVector dispatchers;
- rv = dispatcher->ReadMessage(
- bytes, num_bytes, &dispatchers, &num_handles_value, flags);
+ rv = dispatcher->ReadMessage(bytes, num_bytes, &dispatchers,
+ &num_handles_value, flags);
if (!dispatchers.empty()) {
DCHECK_EQ(rv, MOJO_RESULT_OK);
DCHECK(!num_handles.IsNull());
@@ -466,8 +454,8 @@ MojoResult Core::CreateSharedBuffer(
return result;
scoped_refptr<SharedBufferDispatcher> dispatcher;
- result = SharedBufferDispatcher::Create(
- platform_support(), validated_options, num_bytes, &dispatcher);
+ result = SharedBufferDispatcher::Create(platform_support(), validated_options,
+ num_bytes, &dispatcher);
if (result != MOJO_RESULT_OK) {
DCHECK(!dispatcher.get());
return result;
« no previous file with comments | « mojo/edk/system/channel_unittest.cc ('k') | mojo/edk/system/core_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698