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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_handle.h

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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef LIBRARIES_NACL_IO_KERNEL_HANDLE_H_ 5 #ifndef LIBRARIES_NACL_IO_KERNEL_HANDLE_H_
6 #define LIBRARIES_NACL_IO_KERNEL_HANDLE_H_ 6 #define LIBRARIES_NACL_IO_KERNEL_HANDLE_H_
7 7
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 #include <ppapi/c/pp_resource.h> 10 #include <ppapi/c/pp_resource.h>
(...skipping 22 matching lines...) Expand all
33 33
34 off_t offs; 34 off_t offs;
35 int flags; 35 int flags;
36 }; 36 };
37 37
38 // KernelHandle provides a reference counted container for the open 38 // KernelHandle provides a reference counted container for the open
39 // file information, such as it's filesystem, node, access type and offset. 39 // file information, such as it's filesystem, node, access type and offset.
40 // KernelHandle can only be referenced when the KernelProxy lock is held. 40 // KernelHandle can only be referenced when the KernelProxy lock is held.
41 class KernelHandle : public sdk_util::RefObject { 41 class KernelHandle : public sdk_util::RefObject {
42 public: 42 public:
43
44 KernelHandle(); 43 KernelHandle();
45 KernelHandle(const ScopedFilesystem& fs, const ScopedNode& node); 44 KernelHandle(const ScopedFilesystem& fs, const ScopedNode& node);
46 ~KernelHandle(); 45 ~KernelHandle();
47 46
48 Error Init(int open_flags); 47 Error Init(int open_flags);
49 48
50 Error Accept(PP_Resource* new_sock, struct sockaddr* addr, socklen_t* len); 49 Error Accept(PP_Resource* new_sock, struct sockaddr* addr, socklen_t* len);
51 Error Connect(const struct sockaddr* addr, socklen_t len); 50 Error Connect(const struct sockaddr* addr, socklen_t len);
52 Error Fcntl(int request, int* result, ...); 51 Error Fcntl(int request, int* result, ...);
53 Error VFcntl(int request, int* result, va_list args); 52 Error VFcntl(int request, int* result, va_list args);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 89
91 friend class KernelProxy; 90 friend class KernelProxy;
92 DISALLOW_COPY_AND_ASSIGN(KernelHandle); 91 DISALLOW_COPY_AND_ASSIGN(KernelHandle);
93 }; 92 };
94 93
95 typedef sdk_util::ScopedRef<KernelHandle> ScopedKernelHandle; 94 typedef sdk_util::ScopedRef<KernelHandle> ScopedKernelHandle;
96 95
97 } // namespace nacl_io 96 } // namespace nacl_io
98 97
99 #endif // LIBRARIES_NACL_IO_KERNEL_HANDLE_H_ 98 #endif // LIBRARIES_NACL_IO_KERNEL_HANDLE_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/ioctl.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698