OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "mojo/edk/system/raw_channel.h" | 5 #include "mojo/edk/system/raw_channel.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "mojo/edk/system/message_in_transit.h" | 16 #include "mojo/edk/system/message_in_transit.h" |
17 #include "mojo/edk/system/transport_data.h" | 17 #include "mojo/edk/system/transport_data.h" |
18 | 18 |
| 19 using mojo::util::MutexLocker; |
| 20 |
19 namespace mojo { | 21 namespace mojo { |
20 namespace system { | 22 namespace system { |
21 | 23 |
22 const size_t kReadSize = 4096; | 24 const size_t kReadSize = 4096; |
23 | 25 |
24 // RawChannel::ReadBuffer ------------------------------------------------------ | 26 // RawChannel::ReadBuffer ------------------------------------------------------ |
25 | 27 |
26 RawChannel::ReadBuffer::ReadBuffer() : buffer_(kReadSize), num_valid_bytes_(0) { | 28 RawChannel::ReadBuffer::ReadBuffer() : buffer_(kReadSize), num_valid_bytes_(0) { |
27 } | 29 } |
28 | 30 |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 | 506 |
505 write_stopped_ = true; | 507 write_stopped_ = true; |
506 write_buffer_->message_queue_.Clear(); | 508 write_buffer_->message_queue_.Clear(); |
507 write_buffer_->platform_handles_offset_ = 0; | 509 write_buffer_->platform_handles_offset_ = 0; |
508 write_buffer_->data_offset_ = 0; | 510 write_buffer_->data_offset_ = 0; |
509 return false; | 511 return false; |
510 } | 512 } |
511 | 513 |
512 } // namespace system | 514 } // namespace system |
513 } // namespace mojo | 515 } // namespace mojo |
OLD | NEW |