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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/devfs/jspipe_node.cc

Issue 303223007: [NaCl SDK] nacl_io: Run clang-format over nacl_io sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 "nacl_io/devfs/jspipe_node.h" 5 #include "nacl_io/devfs/jspipe_node.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "nacl_io/devfs/dev_fs.h" 9 #include "nacl_io/devfs/dev_fs.h"
10 #include "nacl_io/error.h" 10 #include "nacl_io/error.h"
11 #include "nacl_io/ioctl.h" 11 #include "nacl_io/ioctl.h"
12 #include "nacl_io/kernel_handle.h" 12 #include "nacl_io/kernel_handle.h"
13 #include "nacl_io/log.h" 13 #include "nacl_io/log.h"
14 #include "nacl_io/pepper_interface.h" 14 #include "nacl_io/pepper_interface.h"
15 15
16 #define TRACE(format, ...) LOG_TRACE("jspipe: " format, ##__VA_ARGS__) 16 #define TRACE(format, ...) LOG_TRACE("jspipe: " format, ##__VA_ARGS__)
17 #define ERROR(format, ...) LOG_TRACE("jspipe: " format, ##__VA_ARGS__) 17 #define ERROR(format, ...) LOG_TRACE("jspipe: " format, ##__VA_ARGS__)
18 18
19 namespace { 19 namespace {
20 const size_t kPostMessageBufferSize = 512*1024; 20 const size_t kPostMessageBufferSize = 512 * 1024;
21 } 21 }
22 22
23 namespace nacl_io { 23 namespace nacl_io {
24 24
25 JSPipeNode::JSPipeNode(Filesystem* filesystem) 25 JSPipeNode::JSPipeNode(Filesystem* filesystem)
26 : Node(filesystem), 26 : Node(filesystem),
27 pipe_(new JSPipeEventEmitter(filesystem_->ppapi(), kPostMessageBufferSize)) 27 pipe_(new JSPipeEventEmitter(filesystem_->ppapi(),
28 { 28 kPostMessageBufferSize)) {
29 } 29 }
30 30
31 JSPipeEventEmitter* JSPipeNode::GetEventEmitter() { 31 JSPipeEventEmitter* JSPipeNode::GetEventEmitter() {
32 return pipe_.get(); 32 return pipe_.get();
33 } 33 }
34 34
35 Error JSPipeNode::Read(const HandleAttr& attr, 35 Error JSPipeNode::Read(const HandleAttr& attr,
36 void* buf, 36 void* buf,
37 size_t count, 37 size_t count,
38 int* out_bytes) { 38 int* out_bytes) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 default: 92 default:
93 TRACE("unknown ioctl: %#x", request); 93 TRACE("unknown ioctl: %#x", request);
94 break; 94 break;
95 } 95 }
96 96
97 return EINVAL; 97 return EINVAL;
98 } 98 }
99 99
100 } // namespace nacl_io 100 } // namespace nacl_io
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/devfs/jspipe_node.h ('k') | native_client_sdk/src/libraries/nacl_io/devfs/tty_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698