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

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

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes 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 98380a9eb5f4b3971aee98cf55955ba5dc72c85b..27b9ccfc3f0f337c1bbdc875bfa04b23b9030383 100644
--- a/mojo/edk/system/raw_channel_win.cc
+++ b/mojo/edk/system/raw_channel_win.cc
@@ -371,11 +371,9 @@ RawChannel::IOResult RawChannelWin::Read(size_t* bytes_read) {
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)
@@ -388,11 +386,9 @@ RawChannel::IOResult RawChannelWin::Read(size_t* bytes_read) {
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;
@@ -426,12 +422,10 @@ RawChannel::IOResult RawChannelWin::ScheduleRead() {
// |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;
}
@@ -465,11 +459,10 @@ RawChannel::IOResult RawChannelWin::WriteNoLock(
// 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)
@@ -521,8 +514,7 @@ RawChannel::IOResult RawChannelWin::ScheduleWriteNoLock() {
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