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

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

Issue 2039713004: [mojo-edk] Make the Mojo EDK compile under NaCl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 6 months 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/BUILD.gn ('k') | mojo/edk/system/core.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/channel.h" 5 #include "mojo/edk/system/channel.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <sys/uio.h> 8 #include <sys/socket.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <deque> 11 #include <deque>
12 #include <limits> 12 #include <limits>
13 #include <memory> 13 #include <memory>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/message_loop/message_loop.h" 19 #include "base/message_loop/message_loop.h"
20 #include "base/synchronization/lock.h" 20 #include "base/synchronization/lock.h"
21 #include "base/task_runner.h" 21 #include "base/task_runner.h"
22 #include "mojo/edk/embedder/platform_channel_utils_posix.h" 22 #include "mojo/edk/embedder/platform_channel_utils_posix.h"
23 #include "mojo/edk/embedder/platform_handle_vector.h" 23 #include "mojo/edk/embedder/platform_handle_vector.h"
24 24
25 #if !defined(OS_NACL)
26 #include <sys/uio.h>
27 #endif
28
25 namespace mojo { 29 namespace mojo {
26 namespace edk { 30 namespace edk {
27 31
28 namespace { 32 namespace {
29 33
30 const size_t kMaxBatchReadCapacity = 256 * 1024; 34 const size_t kMaxBatchReadCapacity = 256 * 1024;
31 35
32 // A view over a Channel::Message object. The write queue uses these since 36 // A view over a Channel::Message object. The write queue uses these since
33 // large messages may need to be sent in chunks. 37 // large messages may need to be sent in chunks.
34 class MessageView { 38 class MessageView {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 // static 502 // static
499 scoped_refptr<Channel> Channel::Create( 503 scoped_refptr<Channel> Channel::Create(
500 Delegate* delegate, 504 Delegate* delegate,
501 ScopedPlatformHandle platform_handle, 505 ScopedPlatformHandle platform_handle,
502 scoped_refptr<base::TaskRunner> io_task_runner) { 506 scoped_refptr<base::TaskRunner> io_task_runner) {
503 return new ChannelPosix(delegate, std::move(platform_handle), io_task_runner); 507 return new ChannelPosix(delegate, std::move(platform_handle), io_task_runner);
504 } 508 }
505 509
506 } // namespace edk 510 } // namespace edk
507 } // namespace mojo 511 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698