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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/filesystem.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/filesystem.h" 5 #include "nacl_io/filesystem.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <string> 9 #include <string>
10 10
11 #include "nacl_io/dir_node.h" 11 #include "nacl_io/dir_node.h"
12 #include "nacl_io/node.h" 12 #include "nacl_io/node.h"
13 #include "nacl_io/osstat.h" 13 #include "nacl_io/osstat.h"
14 #include "nacl_io/path.h" 14 #include "nacl_io/path.h"
15 #include "sdk_util/auto_lock.h" 15 #include "sdk_util/auto_lock.h"
16 #include "sdk_util/ref_object.h" 16 #include "sdk_util/ref_object.h"
17 17
18 #if defined(WIN32) 18 #if defined(WIN32)
19 #include <windows.h> 19 #include <windows.h>
20 #endif 20 #endif
21 21
22 namespace nacl_io { 22 namespace nacl_io {
23 23
24 Filesystem::Filesystem() : dev_(0) {} 24 Filesystem::Filesystem() : dev_(0) {
25 }
25 26
26 Filesystem::~Filesystem() {} 27 Filesystem::~Filesystem() {
28 }
27 29
28 Error Filesystem::Init(const FsInitArgs& args) { 30 Error Filesystem::Init(const FsInitArgs& args) {
29 dev_ = args.dev; 31 dev_ = args.dev;
30 ppapi_ = args.ppapi; 32 ppapi_ = args.ppapi;
31 return 0; 33 return 0;
32 } 34 }
33 35
34 void Filesystem::Destroy() {} 36 void Filesystem::Destroy() {
37 }
35 38
36 Error Filesystem::OpenResource(const Path& path, ScopedNode* out_node) { 39 Error Filesystem::OpenResource(const Path& path, ScopedNode* out_node) {
37 out_node->reset(NULL); 40 out_node->reset(NULL);
38 return EINVAL; 41 return EINVAL;
39 } 42 }
40 43
41 void Filesystem::OnNodeCreated(Node* node) { 44 void Filesystem::OnNodeCreated(Node* node) {
42 node->stat_.st_ino = inode_pool_.Acquire(); 45 node->stat_.st_ino = inode_pool_.Acquire();
43 node->stat_.st_dev = dev_; 46 node->stat_.st_dev = dev_;
44 } 47 }
45 48
46 void Filesystem::OnNodeDestroyed(Node* node) { 49 void Filesystem::OnNodeDestroyed(Node* node) {
47 if (node->stat_.st_ino) 50 if (node->stat_.st_ino)
48 inode_pool_.Release(node->stat_.st_ino); 51 inode_pool_.Release(node->stat_.st_ino);
49 } 52 }
50 53
51 Error Filesystem::Filesystem_VIoctl(int request, va_list args) { 54 Error Filesystem::Filesystem_VIoctl(int request, va_list args) {
52 return EINVAL; 55 return EINVAL;
53 } 56 }
54 57
55 } // namespace nacl_io 58 } // namespace nacl_io
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/fifo_char.cc ('k') | native_client_sdk/src/libraries/nacl_io/fuse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698