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

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

Issue 728043002: Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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/raw_channel_unittest.cc ('k') | mojo/edk/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/raw_channel_win.cc
diff --git a/mojo/edk/system/raw_channel_win.cc b/mojo/edk/system/raw_channel_win.cc
index 27b9ccfc3f0f337c1bbdc875bfa04b23b9030383..98380a9eb5f4b3971aee98cf55955ba5dc72c85b 100644
--- a/mojo/edk/system/raw_channel_win.cc
+++ b/mojo/edk/system/raw_channel_win.cc
@@ -371,9 +371,11 @@
size_t bytes_to_read = 0;
read_buffer()->GetBuffer(&buffer, &bytes_to_read);
- BOOL result =
- ReadFile(io_handler_->handle(), buffer, static_cast<DWORD>(bytes_to_read),
- nullptr, &io_handler_->read_context()->overlapped);
+ BOOL result = ReadFile(io_handler_->handle(),
+ buffer,
+ static_cast<DWORD>(bytes_to_read),
+ nullptr,
+ &io_handler_->read_context()->overlapped);
if (!result) {
DWORD error = GetLastError();
if (error == ERROR_BROKEN_PIPE)
@@ -386,9 +388,11 @@
if (result && skip_completion_port_on_success_) {
DWORD bytes_read_dword = 0;
- BOOL get_size_result = GetOverlappedResult(
- io_handler_->handle(), &io_handler_->read_context()->overlapped,
- &bytes_read_dword, FALSE);
+ BOOL get_size_result =
+ GetOverlappedResult(io_handler_->handle(),
+ &io_handler_->read_context()->overlapped,
+ &bytes_read_dword,
+ FALSE);
DPCHECK(get_size_result);
*bytes_read = bytes_read_dword;
return IO_SUCCEEDED;
@@ -422,10 +426,12 @@
// |io_handler_| won't go away before the task is run, so it is safe to use
// |base::Unretained()|.
message_loop_for_io()->PostTask(
- FROM_HERE, base::Bind(&RawChannelIOHandler::OnIOCompleted,
- base::Unretained(io_handler_),
- base::Unretained(io_handler_->read_context()),
- static_cast<DWORD>(bytes_read), ERROR_SUCCESS));
+ FROM_HERE,
+ base::Bind(&RawChannelIOHandler::OnIOCompleted,
+ base::Unretained(io_handler_),
+ base::Unretained(io_handler_->read_context()),
+ static_cast<DWORD>(bytes_read),
+ ERROR_SUCCESS));
return IO_PENDING;
}
@@ -459,10 +465,11 @@
// TODO(yzshen): Handle multi-segment writes more efficiently.
DWORD bytes_written_dword = 0;
- BOOL result =
- WriteFile(io_handler_->handle(), buffers[0].addr,
- static_cast<DWORD>(buffers[0].size), &bytes_written_dword,
- &io_handler_->write_context_no_lock()->overlapped);
+ BOOL result = WriteFile(io_handler_->handle(),
+ buffers[0].addr,
+ static_cast<DWORD>(buffers[0].size),
+ &bytes_written_dword,
+ &io_handler_->write_context_no_lock()->overlapped);
if (!result) {
DWORD error = GetLastError();
if (error == ERROR_BROKEN_PIPE)
@@ -514,7 +521,8 @@
base::Bind(&RawChannelIOHandler::OnIOCompleted,
base::Unretained(io_handler_),
base::Unretained(io_handler_->write_context_no_lock()),
- static_cast<DWORD>(bytes_written), ERROR_SUCCESS));
+ static_cast<DWORD>(bytes_written),
+ ERROR_SUCCESS));
return IO_PENDING;
}
« no previous file with comments | « mojo/edk/system/raw_channel_unittest.cc ('k') | mojo/edk/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698