| OLD | NEW |
| 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_MOUNTS_KERNEL_PROXY_H_ | 5 #ifndef LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ |
| 6 #define LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ | 6 #define LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ |
| 7 | 7 |
| 8 #include <pthread.h> | 8 #include <pthread.h> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // file handle corresponding to fd is a directory | 71 // file handle corresponding to fd is a directory |
| 72 virtual off_t lseek(int fd, off_t offset, int whence); | 72 virtual off_t lseek(int fd, off_t offset, int whence); |
| 73 | 73 |
| 74 // remove() uses the mount's GetNode() and Stat() to determine whether or | 74 // remove() uses the mount's GetNode() and Stat() to determine whether or |
| 75 // not the path corresponds to a directory or a file. The mount's Rmdir() | 75 // not the path corresponds to a directory or a file. The mount's Rmdir() |
| 76 // or Unlink() is called accordingly. | 76 // or Unlink() is called accordingly. |
| 77 virtual int remove(const char* path); | 77 virtual int remove(const char* path); |
| 78 // unlink() is a simple wrapper around the mount's Unlink function. | 78 // unlink() is a simple wrapper around the mount's Unlink function. |
| 79 virtual int unlink(const char* path); | 79 virtual int unlink(const char* path); |
| 80 // access() uses the Mount's Stat(). | 80 // access() uses the Mount's Stat(). |
| 81 int access(const char*path, int amode); | 81 virtual int access(const char* path, int amode); |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 MountFactoryMap_t factories_; | 84 MountFactoryMap_t factories_; |
| 85 int dev_; | 85 int dev_; |
| 86 | 86 |
| 87 static KernelProxy *s_instance_; | 87 static KernelProxy *s_instance_; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(KernelProxy); | 89 DISALLOW_COPY_AND_ASSIGN(KernelProxy); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 #endif // LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ | 92 #endif // LIBRARIES_NACL_MOUNTS_KERNEL_PROXY_H_ |
| OLD | NEW |