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

Side by Side Diff: mojo/edk/system/raw_channel.cc

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops Created 5 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/raw_channel.h ('k') | mojo/edk/system/raw_channel_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « mojo/edk/system/raw_channel.h ('k') | mojo/edk/system/raw_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698