OLD | NEW |
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 #ifndef LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_H_ | 5 #ifndef LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_H_ |
6 #define LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_H_ | 6 #define LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_H_ |
7 | 7 |
8 #include <pthread.h> | 8 #include <pthread.h> |
9 | 9 |
10 #include "nacl_io/filesystem.h" | 10 #include "nacl_io/filesystem.h" |
11 #include "nacl_io/pepper_interface.h" | 11 #include "nacl_io/pepper_interface.h" |
12 #include "nacl_io/typed_fs_factory.h" | 12 #include "nacl_io/typed_fs_factory.h" |
13 #include "sdk_util/simple_lock.h" | 13 #include "sdk_util/simple_lock.h" |
14 | 14 |
15 namespace nacl_io { | 15 namespace nacl_io { |
16 | 16 |
17 class Node; | 17 class Node; |
18 | 18 |
19 class Html5Fs : public Filesystem { | 19 class Html5Fs : public Filesystem { |
20 public: | 20 public: |
21 virtual Error Open(const Path& path, int mode, ScopedNode* out_node); | 21 virtual Error OpenWithMode(const Path& path, int open_flags, mode_t mode, |
| 22 ScopedNode* out_node); |
22 virtual Error Unlink(const Path& path); | 23 virtual Error Unlink(const Path& path); |
23 virtual Error Mkdir(const Path& path, int permissions); | 24 virtual Error Mkdir(const Path& path, int permissions); |
24 virtual Error Rmdir(const Path& path); | 25 virtual Error Rmdir(const Path& path); |
25 virtual Error Remove(const Path& path); | 26 virtual Error Remove(const Path& path); |
26 virtual Error Rename(const Path& path, const Path& newpath); | 27 virtual Error Rename(const Path& path, const Path& newpath); |
27 | 28 |
28 PP_Resource filesystem_resource() { return filesystem_resource_; } | 29 PP_Resource filesystem_resource() { return filesystem_resource_; } |
29 | 30 |
30 protected: | 31 protected: |
31 static const int REMOVE_DIR = 1; | 32 static const int REMOVE_DIR = 1; |
(...skipping 25 matching lines...) Expand all Loading... |
57 pthread_cond_t filesystem_open_cond_; | 58 pthread_cond_t filesystem_open_cond_; |
58 sdk_util::SimpleLock filesysem_open_lock_; | 59 sdk_util::SimpleLock filesysem_open_lock_; |
59 std::string prefix_; | 60 std::string prefix_; |
60 | 61 |
61 friend class TypedFsFactory<Html5Fs>; | 62 friend class TypedFsFactory<Html5Fs>; |
62 }; | 63 }; |
63 | 64 |
64 } // namespace nacl_io | 65 } // namespace nacl_io |
65 | 66 |
66 #endif // LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_H_ | 67 #endif // LIBRARIES_NACL_IO_HTML5FS_HTML5_FS_H_ |
OLD | NEW |