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_MOUNT_MEM_H_ | 5 #ifndef LIBRARIES_NACL_MOUNTS_MOUNT_MEM_H_ |
6 #define LIBRARIES_NACL_MOUNTS_MOUNT_MEM_H_ | 6 #define LIBRARIES_NACL_MOUNTS_MOUNT_MEM_H_ |
7 | 7 |
8 #include <stdint.h> | |
9 #include <map> | 8 #include <map> |
10 #include <string> | 9 #include <string> |
11 | 10 |
12 #include "nacl_mounts/mount.h" | 11 #include "nacl_mounts/mount.h" |
13 | 12 |
14 | |
15 class MountMem : public MountFactory<MountMem, Mount> { | 13 class MountMem : public MountFactory<MountMem, Mount> { |
16 protected: | 14 protected: |
17 MountMem(); | 15 MountMem(); |
18 | 16 |
19 virtual bool Init(int dev, StringMap_t& args); | 17 virtual bool Init(int dev, StringMap_t& args); |
20 virtual void Destroy(); | 18 virtual void Destroy(); |
21 | 19 |
22 // The protected functions are only used internally and will not | 20 // The protected functions are only used internally and will not |
23 // acquire or release the mount's lock themselves. The caller is | 21 // acquire or release the mount's lock themselves. The caller is |
24 // returned to use correct locking as needed. | 22 // returned to use correct locking as needed. |
(...skipping 20 matching lines...) Expand all Loading... |
45 private: | 43 private: |
46 MountNode* root_; | 44 MountNode* root_; |
47 INOList_t inos_; | 45 INOList_t inos_; |
48 size_t max_ino_; | 46 size_t max_ino_; |
49 | 47 |
50 template <class M, class P> friend class MountFactory; | 48 template <class M, class P> friend class MountFactory; |
51 DISALLOW_COPY_AND_ASSIGN(MountMem); | 49 DISALLOW_COPY_AND_ASSIGN(MountMem); |
52 }; | 50 }; |
53 | 51 |
54 #endif // LIBRARIES_NACL_MOUNTS_MOUNT_MEM_H_ | 52 #endif // LIBRARIES_NACL_MOUNTS_MOUNT_MEM_H_ |
55 | |
OLD | NEW |