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

Side by Side Diff: native_client_sdk/src/libraries/nacl_mounts/mount_mem.h

Issue 12166002: Cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 13 matching lines...) Expand all
24 MountNode *AllocatePath(int mode); 24 MountNode *AllocatePath(int mode);
25 25
26 // Allocate or free an INODE number. 26 // Allocate or free an INODE number.
27 int AllocateINO(); 27 int AllocateINO();
28 void FreeINO(int ino); 28 void FreeINO(int ino);
29 29
30 // Find a Node specified node optionally failing if type does not match. 30 // Find a Node specified node optionally failing if type does not match.
31 virtual MountNode* FindNode(const Path& path, int type = 0); 31 virtual MountNode* FindNode(const Path& path, int type = 0);
32 32
33 public: 33 public:
34 typedef std::vector<ino_t> INOList_t;
35 34
binji 2013/02/02 00:04:44 nit: extra line
noelallen1 2013/02/04 18:40:06 Done.
36 virtual MountNode *Open(const Path& path, int mode); 35 virtual MountNode *Open(const Path& path, int mode);
37 virtual int Unlink(const Path& path); 36 virtual int Unlink(const Path& path);
38 virtual int Mkdir(const Path& path, int perm); 37 virtual int Mkdir(const Path& path, int perm);
39 virtual int Rmdir(const Path& path); 38 virtual int Rmdir(const Path& path);
40 virtual int Remove(const Path& path); 39 virtual int Remove(const Path& path);
41 40
42 private: 41 private:
43 static const int REMOVE_DIR = 1; 42 static const int REMOVE_DIR = 1;
44 static const int REMOVE_FILE = 2; 43 static const int REMOVE_FILE = 2;
45 static const int REMOVE_ALL = REMOVE_DIR | REMOVE_FILE; 44 static const int REMOVE_ALL = REMOVE_DIR | REMOVE_FILE;
46 45
47 int RemoveInternal(const Path& path, int remove_type); 46 int RemoveInternal(const Path& path, int remove_type);
48 47
49 MountNode* root_; 48 MountNode* root_;
50 INOList_t inos_;
51 size_t max_ino_; 49 size_t max_ino_;
52 50
53 friend class Mount; 51 friend class Mount;
54 DISALLOW_COPY_AND_ASSIGN(MountMem); 52 DISALLOW_COPY_AND_ASSIGN(MountMem);
55 }; 53 };
56 54
57 #endif // LIBRARIES_NACL_MOUNTS_MOUNT_MEM_H_ 55 #endif // LIBRARIES_NACL_MOUNTS_MOUNT_MEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698