Index: mojo/edk/system/raw_channel.cc |
diff --git a/mojo/edk/system/raw_channel.cc b/mojo/edk/system/raw_channel.cc |
index 433116680d0d3672f315473f779eaa8bf78cade1..0bfe104590b33ca4fa63f43ada2acb75e8c05b02 100644 |
--- a/mojo/edk/system/raw_channel.cc |
+++ b/mojo/edk/system/raw_channel.cc |
@@ -133,8 +133,9 @@ |
// attached. |
// Write from both buffers. |
- DCHECK_EQ(bytes_to_write, message->main_buffer_size() - data_offset_ + |
- transport_data_buffer_size); |
+ DCHECK_EQ( |
+ bytes_to_write, |
+ message->main_buffer_size() - data_offset_ + transport_data_buffer_size); |
Buffer buffer1 = { |
static_cast<const char*>(message->main_buffer()) + data_offset_, |
message->main_buffer_size() - data_offset_}; |
@@ -194,9 +195,11 @@ |
if (io_result != IO_PENDING) { |
// This will notify the delegate about the read failure. Although we're on |
// the I/O thread, don't call it in the nested context. |
- message_loop_for_io_->PostTask( |
- FROM_HERE, base::Bind(&RawChannel::OnReadCompleted, |
- weak_ptr_factory_.GetWeakPtr(), io_result, 0)); |
+ message_loop_for_io_->PostTask(FROM_HERE, |
+ base::Bind(&RawChannel::OnReadCompleted, |
+ weak_ptr_factory_.GetWeakPtr(), |
+ io_result, |
+ 0)); |
} |
// ScheduleRead() failure is treated as a read failure (by notifying the |
@@ -243,15 +246,15 @@ |
if (io_result == IO_PENDING) |
return true; |
- bool result = OnWriteCompletedNoLock(io_result, platform_handles_written, |
- bytes_written); |
+ bool result = OnWriteCompletedNoLock( |
+ io_result, platform_handles_written, bytes_written); |
if (!result) { |
// Even if we're on the I/O thread, don't call |OnError()| in the nested |
// context. |
- message_loop_for_io_->PostTask( |
- FROM_HERE, |
- base::Bind(&RawChannel::CallOnError, weak_ptr_factory_.GetWeakPtr(), |
- Delegate::ERROR_WRITE)); |
+ message_loop_for_io_->PostTask(FROM_HERE, |
+ base::Bind(&RawChannel::CallOnError, |
+ weak_ptr_factory_.GetWeakPtr(), |
+ Delegate::ERROR_WRITE)); |
} |
return result; |
@@ -309,7 +312,8 @@ |
// TODO(vtl): Validate that |message_size| is sane. |
while (remaining_bytes > 0 && MessageInTransit::GetNextMessageSize( |
&read_buffer_->buffer_[read_buffer_start], |
- remaining_bytes, &message_size) && |
+ remaining_bytes, |
+ &message_size) && |
remaining_bytes >= message_size) { |
MessageInTransit::View message_view( |
message_size, &read_buffer_->buffer_[read_buffer_start]); |
@@ -337,7 +341,8 @@ |
size_t num_platform_handles; |
const void* platform_handle_table; |
TransportData::GetPlatformHandleTable( |
- message_view.transport_data_buffer(), &num_platform_handles, |
+ message_view.transport_data_buffer(), |
+ &num_platform_handles, |
&platform_handle_table); |
if (num_platform_handles > 0) { |
@@ -378,7 +383,8 @@ |
read_buffer_->num_valid_bytes_ = remaining_bytes; |
if (read_buffer_->num_valid_bytes_ > 0) { |
memmove(&read_buffer_->buffer_[0], |
- &read_buffer_->buffer_[read_buffer_start], remaining_bytes); |
+ &read_buffer_->buffer_[read_buffer_start], |
+ remaining_bytes); |
} |
read_buffer_start = 0; |
} |
@@ -427,8 +433,8 @@ |
return; |
} |
- did_fail = !OnWriteCompletedNoLock(io_result, platform_handles_written, |
- bytes_written); |
+ did_fail = !OnWriteCompletedNoLock( |
+ io_result, platform_handles_written, bytes_written); |
} |
if (did_fail) |